Production of complex organic molecules: H-atom addition versus UV irradiation