Added examples for writing data to files