The text file reader now closes the text file after reading.