fix many Broken pipe bugs, but leave one when booting