removing a file or folder, restoring back if needed