making files automatically revert