fixing error log level file write