Gracefully handle broken pipes