small mistake in writing file