Fix Broken pipe error with `head` command