Fixed file and text file bug