Add example for writing file