exit on write error, but add an option to keep on truckin'