Check to make sure that our stream is still valid before trying feof.