fixed text file operations