Removing reference to deleted files