avoid errors with empty fields/lines
exit on broken pipe (suppress error message)