add saveToFile function to AdditionsFunctions