Fix for logging on debug builds