fixed logging functions