diff --git a/bmc/firmware_handler.cpp b/bmc/firmware_handler.cpp
index 96b4eba..d58825e 100644
--- a/bmc/firmware_handler.cpp
+++ b/bmc/firmware_handler.cpp
@@ -101,21 +101,6 @@
  */
 bool FirmwareBlobHandler::deleteBlob(const std::string& path)
 {
-    /* This cannot be called if you have an open session to the path.
-     * You can have an open session to verify/update/hash/image, but not active*
-     *
-     * Therefore, if this is called, it's either on a blob that isn't presently
-     * open.  However, there could be open blobs, so we need to close all open
-     * sessions. This closing on our is an invalid handler behavior.  Therefore,
-     * we cannot close an active session.  To enforce this, we only allow
-     * deleting if there isn't a file open.
-     */
-    if (fileOpen())
-    {
-        return false;
-    }
-
-    /* only includes states where fileOpen() == false */
     switch (state)
     {
         case UpdateState::notYetStarted:
@@ -740,16 +725,18 @@
             break;
     }
 
-    if (item->second->dataHandler)
+    if (!lookup.empty())
     {
-        item->second->dataHandler->close();
+        if (item->second->dataHandler)
+        {
+            item->second->dataHandler->close();
+        }
+        if (item->second->imageHandler)
+        {
+            item->second->imageHandler->close();
+        }
+        lookup.erase(item);
     }
-    if (item->second->imageHandler)
-    {
-        item->second->imageHandler->close();
-    }
-
-    lookup.erase(item);
     return true;
 }
 
@@ -803,6 +790,19 @@
     removeBlobId(activeImageBlobId);
     removeBlobId(activeHashBlobId);
 
+    for (auto item : lookup)
+    {
+        if (item.second->dataHandler)
+        {
+            item.second->dataHandler->close();
+        }
+        if (item.second->imageHandler)
+        {
+            item.second->imageHandler->close();
+        }
+    }
+    lookup.clear();
+
     openedFirmwareType = "";
     changeState(UpdateState::notYetStarted);
 }
