Fix slow loading of text files