now we handle PIPE_BROKEN as an EOF also set up framework for debugging unexpected posix/windows errors