Changed so as to only read in text files