diff --git a/host_check.cpp b/host_check.cpp
index 2bdcb1f..7e6dbef 100644
--- a/host_check.cpp
+++ b/host_check.cpp
@@ -101,12 +101,16 @@
                               CONDITION_HOST_PROPERTY);
 
                 auto response = bus.call(method);
-
                 std::variant<FirmwareCondition> currentFwCondV;
                 response.read(currentFwCondV);
                 auto currentFwCond =
                     std::get<FirmwareCondition>(currentFwCondV);
 
+                info(
+                    "Read host fw condition {COND_VALUE} from {COND_SERVICE}, {COND_PATH}",
+                    "COND_VALUE", currentFwCond, "COND_SERVICE", service,
+                    "COND_PATH", path);
+
                 if (currentFwCond == FirmwareCondition::Running)
                 {
                     return true;
@@ -139,9 +143,9 @@
         method.append(CHASSIS_STATE_INTF, CHASSIS_STATE_POWER_PROP);
 
         auto response = bus.call(method);
-
         std::variant<PowerState> currentPowerStateV;
         response.read(currentPowerStateV);
+
         auto currentPowerState = std::get<PowerState>(currentPowerStateV);
 
         if (currentPowerState == PowerState::On)
@@ -176,16 +180,19 @@
     // application that could possibly implement the needed interface have
     // been started. However, the use of mapper to find those interfaces means
     // we have a condition where the interface may be on D-Bus but not stored
-    // within mapper yet. Keep it simple and just build one retry into the
-    // check if it's found the host is not up. This service is only called if
-    // chassis power is on when the BMC comes up, so this wont impact most
-    // normal cases where the BMC is rebooted with chassis power off. In
-    // cases where chassis power is on, the host is likely running so we want
-    // to be sure we check all interfaces
-    for (int i = 0; i < 2; i++)
+    // within mapper yet. There are five built in retries to check if it's
+    // found the host is not up. This service is only called if chassis power
+    // is on when the BMC comes up, so this wont impact most normal cases
+    // where the BMC is rebooted with chassis power off. In cases where
+    // chassis power is on, the host is likely running so we want to be sure
+    // we check all interfaces
+    for (int i = 0; i < 5; i++)
     {
+        debug(
+            "Introspecting new bus objects for bus id: {ID} sleeping for 1 second.",
+            "ID", id);
         // Give mapper a small window to introspect new objects on bus
-        std::this_thread::sleep_for(std::chrono::milliseconds(500));
+        std::this_thread::sleep_for(std::chrono::milliseconds(1000));
         if (checkFirmwareConditionRunning(bus))
         {
             info("Host is running!");
