prevent uncaught broken pipe error