reverting file writing