fix use of text files