made logging conditional for the sake of ie