Why did you removed `if err != io.ErrClosedPipe {` ?