error logging to log files working.