Fixed recursive call to SaveToFile method.