fix error file logging