actually check that read may return zero on EOF