fixed logging with formats