Better eof test