change the io.EOF error checking