Fixed text file

Function finished