Restoring file to previous state.