output errors to a log file