added functions: loadTextFile, saveTextFile