diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index 6b9d1d3..a8d2219 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -471,43 +471,8 @@
     userMutex = std::make_unique<boost::interprocess::named_recursive_mutex>(
         boost::interprocess::open_or_create, ipmiUserMutex);
 
-    initUserDataFile();
+    cacheUserDataFile();
     getSystemPrivAndGroups();
-    sigHndlrLock = boost::interprocess::file_lock(ipmiUserDataFile);
-    // Register it for single object and single process either netipimd /
-    // host-ipmid
-    if (userUpdatedSignal == nullptr && sigHndlrLock.try_lock())
-    {
-        log<level::DEBUG>("Registering signal handler");
-        userUpdatedSignal = std::make_unique<sdbusplus::bus::match_t>(
-            bus,
-            sdbusplus::bus::match::rules::type::signal() +
-                sdbusplus::bus::match::rules::interface(dBusObjManager) +
-                sdbusplus::bus::match::rules::path(userMgrObjBasePath),
-            [&](sdbusplus::message::message& msg) {
-                userUpdatedSignalHandler(*this, msg);
-            });
-        userMgrRenamedSignal = std::make_unique<sdbusplus::bus::match_t>(
-            bus,
-            sdbusplus::bus::match::rules::type::signal() +
-                sdbusplus::bus::match::rules::interface(userMgrInterface) +
-                sdbusplus::bus::match::rules::path(userMgrObjBasePath),
-            [&](sdbusplus::message::message& msg) {
-                userUpdatedSignalHandler(*this, msg);
-            });
-        userPropertiesSignal = std::make_unique<sdbusplus::bus::match_t>(
-            bus,
-            sdbusplus::bus::match::rules::type::signal() +
-                sdbusplus::bus::match::rules::path_namespace(userObjBasePath) +
-                sdbusplus::bus::match::rules::interface(
-                    dBusPropertiesInterface) +
-                sdbusplus::bus::match::rules::member(propertiesChangedSignal) +
-                sdbusplus::bus::match::rules::argN(0, usersInterface),
-            [&](sdbusplus::message::message& msg) {
-                userUpdatedSignalHandler(*this, msg);
-            });
-        signalHndlrObject = true;
-    }
 }
 
 UserInfo* UserAccess::getUserInfo(const uint8_t userId)
@@ -1569,7 +1534,7 @@
     return -EIO;
 }
 
-void UserAccess::initUserDataFile()
+void UserAccess::cacheUserDataFile()
 {
     boost::interprocess::scoped_lock<boost::interprocess::named_recursive_mutex>
         userLock{*userMutex};
@@ -1596,6 +1561,41 @@
         }
         writeUserData();
     }
+    sigHndlrLock = boost::interprocess::file_lock(ipmiUserDataFile);
+    // Register it for single object and single process either netipimd /
+    // host-ipmid
+    if (userUpdatedSignal == nullptr && sigHndlrLock.try_lock())
+    {
+        log<level::DEBUG>("Registering signal handler");
+        userUpdatedSignal = std::make_unique<sdbusplus::bus::match_t>(
+            bus,
+            sdbusplus::bus::match::rules::type::signal() +
+                sdbusplus::bus::match::rules::interface(dBusObjManager) +
+                sdbusplus::bus::match::rules::path(userMgrObjBasePath),
+            [&](sdbusplus::message::message& msg) {
+                userUpdatedSignalHandler(*this, msg);
+            });
+        userMgrRenamedSignal = std::make_unique<sdbusplus::bus::match_t>(
+            bus,
+            sdbusplus::bus::match::rules::type::signal() +
+                sdbusplus::bus::match::rules::interface(userMgrInterface) +
+                sdbusplus::bus::match::rules::path(userMgrObjBasePath),
+            [&](sdbusplus::message::message& msg) {
+                userUpdatedSignalHandler(*this, msg);
+            });
+        userPropertiesSignal = std::make_unique<sdbusplus::bus::match_t>(
+            bus,
+            sdbusplus::bus::match::rules::type::signal() +
+                sdbusplus::bus::match::rules::path_namespace(userObjBasePath) +
+                sdbusplus::bus::match::rules::interface(
+                    dBusPropertiesInterface) +
+                sdbusplus::bus::match::rules::member(propertiesChangedSignal) +
+                sdbusplus::bus::match::rules::argN(0, usersInterface),
+            [&](sdbusplus::message::message& msg) {
+                userUpdatedSignalHandler(*this, msg);
+            });
+        signalHndlrObject = true;
+    }
     std::map<DbusUserObjPath, DbusUserObjValue> managedObjs;
     try
     {
diff --git a/user_channel/user_mgmt.hpp b/user_channel/user_mgmt.hpp
index 0c38374..054c0e2 100644
--- a/user_channel/user_mgmt.hpp
+++ b/user_channel/user_mgmt.hpp
@@ -392,8 +392,9 @@
     void getSystemPrivAndGroups();
 
     /** @brief function to init user data from configuration & D-Bus objects
+     * and to register for signals
      *
      */
-    void initUserDataFile();
+    void cacheUserDataFile();
 };
 } // namespace ipmi
