test of writing file