Write errors to output file