SaveToFile -simplized