diff --git a/occ_command.cpp b/occ_command.cpp
index 5ab5e12..0b9faa1 100644
--- a/occ_command.cpp
+++ b/occ_command.cpp
@@ -211,15 +211,12 @@
             const unsigned int csumIndex = response.size() - 2;
             const uint32_t rspChecksum =
                 (response[csumIndex] << 8) + response[csumIndex + 1];
-            uint32_t calcChecksum = 0;
+            // OCC checksum is the 2 byte sum of data (ignoring overflow)
+            uint16_t calcChecksum = 0;
             for (unsigned int index = 0; index < csumIndex; ++index)
             {
                 calcChecksum += response[index];
             }
-            while (calcChecksum > 0xFFFF)
-            {
-                calcChecksum = (calcChecksum & 0xFFFF) + (calcChecksum >> 16);
-            }
             if (calcChecksum != rspChecksum)
             {
                 log<level::ERR>(
diff --git a/occ_manager.cpp b/occ_manager.cpp
index 932b052..ada95ef 100644
--- a/occ_manager.cpp
+++ b/occ_manager.cpp
@@ -560,9 +560,6 @@
         }
         else
         {
-            log<level::INFO>(std::format("updateOCCActive: OCC{} active={}",
-                                         instance, status)
-                                 .c_str());
             (*obj)->setPldmSensorReceived(true);
             return (*obj)->occActive(status);
         }
@@ -731,7 +728,8 @@
     }
     catch (const openpower::phal::exception::SbeError& e)
     {
-        log<level::ERR>("Failed to set SBE state");
+        log<level::ERR>(
+            std::format("Failed to set SBE state: {}", e.what()).c_str());
     }
 }
 
diff --git a/occ_pass_through.cpp b/occ_pass_through.cpp
index 5588e5a..8567784 100644
--- a/occ_pass_through.cpp
+++ b/occ_pass_through.cpp
@@ -83,10 +83,37 @@
         return response;
     }
 
-    log<level::INFO>(
-        std::format("PassThrough::send() Sending 0x{:02X} command to OCC{}",
-                    command.front(), occInstance)
-            .c_str());
+    if (command.size() >= 3)
+    {
+        const uint16_t dataLen = command[1] << 8 | command[2];
+        std::string dataString = "";
+        if (command.size() > 3)
+        {
+            // Trace first 4 bytes of command data
+            size_t index = 3;
+            dataString = "0x";
+            for (; (index < 7) && (index < command.size()); ++index)
+            {
+                dataString += std::format("{:02X}", command[index]);
+            }
+            if (index < command.size())
+            {
+                dataString += "...";
+            }
+        }
+        log<level::INFO>(
+            std::format(
+                "PassThrough::send() Sending 0x{:02X} command to OCC{} (data len={}, data={})",
+                command.front(), occInstance, dataLen, dataString)
+                .c_str());
+    }
+    else
+    {
+        log<level::INFO>(
+            std::format("PassThrough::send() Sending 0x{:02X} command to OCC{}",
+                        command.front(), occInstance)
+                .c_str());
+    }
     CmdStatus status = occCmd.send(command, response);
     if (status == CmdStatus::SUCCESS)
     {
