This fixed the logging problem