Fixed file logging problems with errorHandler.