Fix errors in text files