a fix to prevent deleting files when an items is edited