diff --git a/manager/group.cpp b/manager/group.cpp
index d728f2b..c9ad161 100644
--- a/manager/group.cpp
+++ b/manager/group.cpp
@@ -39,7 +39,10 @@
     auto result = manager.setGroupState(path, value, ledsAssert, ledsDeAssert);
 
     // Store asserted state
-    serialize.storeGroups(path, result);
+    if (serializePtr)
+    {
+        serializePtr->storeGroups(path, result);
+    }
 
     // If something does not go right here, then there should be an sdbusplus
     // exception thrown.
diff --git a/manager/group.hpp b/manager/group.hpp
index aec0e85..e3717ca 100644
--- a/manager/group.hpp
+++ b/manager/group.hpp
@@ -35,22 +35,22 @@
 
     /** @brief Constructs LED Group
      *
-     * @param[in] bus       - Handle to system dbus
-     * @param[in] objPath   - The D-Bus path that hosts LED group
-     * @param[in] manager   - Reference to Manager
-     * @param[in] serialize - Serialize object
-     * @param[in] callBack  - Custom callback when LED group is asserted
+     * @param[in] bus           - Handle to system dbus
+     * @param[in] objPath       - The D-Bus path that hosts LED group
+     * @param[in] manager       - Reference to Manager
+     * @param[in] serializePtr  - Serialize object
+     * @param[in] callBack      - Custom callback when LED group is asserted
      */
     Group(sdbusplus::bus_t& bus, const std::string& objPath, Manager& manager,
-          Serialize& serialize,
+          std::shared_ptr<Serialize> serializePtr,
           std::function<void(Group*, bool)> callBack = nullptr) :
 
         GroupInherit(bus, objPath.c_str(), GroupInherit::action::defer_emit),
-        path(objPath), manager(manager), serialize(serialize),
+        path(objPath), manager(manager), serializePtr(serializePtr),
         customCallBack(callBack)
     {
         // Initialize Asserted property value
-        if (serialize.getGroupSavedState(objPath))
+        if (serializePtr && serializePtr->getGroupSavedState(objPath))
         {
             asserted(true);
         }
@@ -74,7 +74,7 @@
     Manager& manager;
 
     /** @brief The serialize class for storing and restoring groups of LEDs */
-    Serialize& serialize;
+    std::shared_ptr<Serialize> serializePtr;
 
     /** @brief Custom callback when LED group is asserted
      */
diff --git a/manager/led-main.cpp b/manager/led-main.cpp
index 281cac9..df0f2bb 100644
--- a/manager/led-main.cpp
+++ b/manager/led-main.cpp
@@ -19,6 +19,7 @@
 
 #include <algorithm>
 #include <iostream>
+#include <memory>
 
 int main(int argc, char** argv)
 {
@@ -51,14 +52,18 @@
     /** @brief vector of led groups */
     std::vector<std::unique_ptr<phosphor::led::Group>> groups;
 
+    std::shared_ptr<phosphor::led::Serialize> serializePtr = nullptr;
+#ifdef PERSISTENT_LED_ASSERTED
     /** @brief store and re-store Group */
-    phosphor::led::Serialize serialize(SAVED_GROUPS_FILE);
+    serializePtr =
+        std::make_shared<phosphor::led::Serialize>(SAVED_GROUPS_FILE);
+#endif
 
 #ifdef USE_LAMP_TEST
     phosphor::led::LampTest lampTest(event, manager);
 
     groups.emplace_back(std::make_unique<phosphor::led::Group>(
-        bus, LAMP_TEST_OBJECT, manager, serialize,
+        bus, LAMP_TEST_OBJECT, manager, serializePtr,
         std::bind(std::mem_fn(&phosphor::led::LampTest::requestHandler),
                   &lampTest, std::placeholders::_1, std::placeholders::_2)));
 
@@ -71,9 +76,9 @@
 
     /** Now create so many dbus objects as there are groups */
     std::ranges::transform(systemLedMap, std::back_inserter(groups),
-                           [&bus, &manager, &serialize](auto& grp) {
+                           [&bus, &manager, serializePtr](auto& grp) {
         return std::make_unique<phosphor::led::Group>(bus, grp.first, manager,
-                                                      serialize);
+                                                      serializePtr);
     });
 
     // Attach the bus to sd_event to service user requests
