Fixed a bug where a newline was being outputted in the log regardless of log level