fixed logging handler