Writing to files example