Added new builder WriteToFile