add exception for broken pipe