eof means end of file. If file is not empty your cycle will run never