Fixed a bug where log level did not work properly.