Finish reading dataset
Replace 'feof' function