Fix bug by editing the while loop condition in readFromFile().
Remove unused library.