fix logging functions not inside classes