Deleting "ghost items" can lead to data loss
It seems that in some cases ghost items can appear in a library. Trying to delete them might result in data loss. This must be prevented e.g. by checking that an item is really inside the library directory an only in this case a delete operation is started.