Added code to read a textfile.