Changed `stdout` to gracefully terminate on broken pipe