Reading a file and getting the list of words found in it