throw expcetion if eof is find too soon