Nicer eof checking