Fixed feof checking error.