Added functionToFile.