diff --git a/bmc/buildjson.cpp b/bmc/buildjson.cpp
index 8113d9c..e4d1d54 100644
--- a/bmc/buildjson.cpp
+++ b/bmc/buildjson.cpp
@@ -100,7 +100,7 @@
                     systemdMode = verify.at("mode").get<std::string>();
                 }
 
-                pack->verification = SystemdVerification::CreateVerification(
+                pack->verification = SystemdWithStatusFile::CreateVerification(
                     sdbusplus::bus::new_default(), path, unit, systemdMode);
             }
             else
@@ -131,7 +131,7 @@
                     systemdMode = update.at("mode").get<std::string>();
                 }
 
-                pack->update = SystemdVerification::CreateVerification(
+                pack->update = SystemdWithStatusFile::CreateVerification(
                     sdbusplus::bus::new_default(), path, unit, systemdMode);
             }
             else if (updateType == "systemd")
diff --git a/bmc/test/firmware_json_unittest.cpp b/bmc/test/firmware_json_unittest.cpp
index 807856d..38bfda6 100644
--- a/bmc/test/firmware_json_unittest.cpp
+++ b/bmc/test/firmware_json_unittest.cpp
@@ -424,7 +424,7 @@
     EXPECT_FALSE(h[0].actions == nullptr);
     EXPECT_FALSE(h[0].actions->preparation == nullptr);
     EXPECT_FALSE(h[0].actions->verification == nullptr);
-    auto verifier = reinterpret_cast<SystemdVerification*>(
+    auto verifier = reinterpret_cast<SystemdWithStatusFile*>(
         h[0].actions->verification.get());
     EXPECT_THAT(verifier->getMode(), "replace");
     EXPECT_FALSE(h[0].actions->update == nullptr);
@@ -468,7 +468,7 @@
     EXPECT_FALSE(h[0].actions == nullptr);
     EXPECT_FALSE(h[0].actions->preparation == nullptr);
     EXPECT_FALSE(h[0].actions->verification == nullptr);
-    auto verifier = reinterpret_cast<SystemdVerification*>(
+    auto verifier = reinterpret_cast<SystemdWithStatusFile*>(
         h[0].actions->verification.get());
     EXPECT_THAT(verifier->getMode(), "replace-nope");
     EXPECT_FALSE(h[0].actions->update == nullptr);
@@ -513,12 +513,12 @@
     EXPECT_FALSE(h[0].actions == nullptr);
     EXPECT_FALSE(h[0].actions->preparation == nullptr);
     EXPECT_FALSE(h[0].actions->verification == nullptr);
-    auto verifier = reinterpret_cast<SystemdVerification*>(
+    auto verifier = reinterpret_cast<SystemdWithStatusFile*>(
         h[0].actions->verification.get());
     EXPECT_THAT(verifier->getMode(), "replace-nope");
     EXPECT_FALSE(h[0].actions->update == nullptr);
     auto updater =
-        reinterpret_cast<SystemdVerification*>(h[0].actions->update.get());
+        reinterpret_cast<SystemdWithStatusFile*>(h[0].actions->update.get());
     EXPECT_THAT(updater->getMode(), "replace-fake");
 }
 
diff --git a/bmc/verify_systemd.cpp b/bmc/verify_systemd.cpp
index e3316a0..3851f94 100644
--- a/bmc/verify_systemd.cpp
+++ b/bmc/verify_systemd.cpp
@@ -28,16 +28,16 @@
 {
 
 std::unique_ptr<TriggerableActionInterface>
-    SystemdVerification::CreateVerification(sdbusplus::bus::bus&& bus,
-                                            const std::string& path,
-                                            const std::string& service,
-                                            const std::string& mode)
+    SystemdWithStatusFile::CreateVerification(sdbusplus::bus::bus&& bus,
+                                              const std::string& path,
+                                              const std::string& service,
+                                              const std::string& mode)
 {
-    return std::make_unique<SystemdVerification>(std::move(bus), path, service,
-                                                 mode);
+    return std::make_unique<SystemdWithStatusFile>(std::move(bus), path,
+                                                   service, mode);
 }
 
-bool SystemdVerification::trigger()
+bool SystemdWithStatusFile::trigger()
 {
     static constexpr auto systemdService = "org.freedesktop.systemd1";
     static constexpr auto systemdRoot = "/org/freedesktop/systemd1";
@@ -63,12 +63,12 @@
     return true;
 }
 
-void SystemdVerification::abort()
+void SystemdWithStatusFile::abort()
 {
     /* TODO: Implement this. */
 }
 
-ActionStatus SystemdVerification::status()
+ActionStatus SystemdWithStatusFile::status()
 {
     ActionStatus result = ActionStatus::unknown;
 
@@ -99,7 +99,7 @@
     return result;
 }
 
-const std::string SystemdVerification::getMode() const
+const std::string SystemdWithStatusFile::getMode() const
 {
     return mode;
 }
diff --git a/bmc/verify_systemd.hpp b/bmc/verify_systemd.hpp
index 9d56722..8126b3b 100644
--- a/bmc/verify_systemd.hpp
+++ b/bmc/verify_systemd.hpp
@@ -15,7 +15,7 @@
  * verification step, however, it leaves room for a future possibility out
  * something wholly configurable.
  */
-class SystemdVerification : public TriggerableActionInterface
+class SystemdWithStatusFile : public TriggerableActionInterface
 {
   public:
     /**
@@ -32,18 +32,18 @@
         CreateVerification(sdbusplus::bus::bus&& bus, const std::string& path,
                            const std::string& service, const std::string& mode);
 
-    SystemdVerification(sdbusplus::bus::bus&& bus, const std::string& path,
-                        const std::string& service, const std::string& mode) :
+    SystemdWithStatusFile(sdbusplus::bus::bus&& bus, const std::string& path,
+                          const std::string& service, const std::string& mode) :
         bus(std::move(bus)),
         checkPath(path), triggerService(service), mode(mode)
     {
     }
 
-    ~SystemdVerification() = default;
-    SystemdVerification(const SystemdVerification&) = delete;
-    SystemdVerification& operator=(const SystemdVerification&) = delete;
-    SystemdVerification(SystemdVerification&&) = default;
-    SystemdVerification& operator=(SystemdVerification&&) = default;
+    ~SystemdWithStatusFile() = default;
+    SystemdWithStatusFile(const SystemdWithStatusFile&) = delete;
+    SystemdWithStatusFile& operator=(const SystemdWithStatusFile&) = delete;
+    SystemdWithStatusFile(SystemdWithStatusFile&&) = default;
+    SystemdWithStatusFile& operator=(SystemdWithStatusFile&&) = default;
 
     bool trigger() override;
     void abort() override;
