output errors to file