diff --git a/control/json/utils/pcie_card_metadata.cpp b/control/json/utils/pcie_card_metadata.cpp
index c8c1b37..1e392af 100644
--- a/control/json/utils/pcie_card_metadata.cpp
+++ b/control/json/utils/pcie_card_metadata.cpp
@@ -39,9 +39,33 @@
 {
     const auto defaultPath = fs::path{"control"} / cardFileName;
 
-    // Look in the override location first
+    // First look in /etc/phosphor-fan-presence/control/
     auto confFile = fs::path{confOverridePath} / defaultPath;
 
+    // Next look in the system subdirectories, first under /etc then /usr.
+    if (!fs::exists(confFile))
+    {
+        for (const auto& systemName : systemNames)
+        {
+            const auto basePath =
+                fs::path{"control"} / systemName / cardFileName;
+
+            // Look in the /etc override location first
+            confFile = fs::path{confOverridePath} / basePath;
+
+            if (!fs::exists(confFile))
+            {
+                confFile = fs::path{confBasePath} / basePath;
+            }
+
+            if (fs::exists(confFile))
+            {
+                break;
+            }
+        }
+    }
+
+    // Next look in /usr/share/phosphor-fan-presence/control/
     if (!fs::exists(confFile))
     {
         confFile = fs::path{confBasePath} / defaultPath;
@@ -60,37 +84,6 @@
                                      confFile.string())
                              .c_str());
     }
-
-    // Go from least specific to most specific in the system names so files in
-    // the latter category can override ones in the former.
-    for (auto nameIt = systemNames.rbegin(); nameIt != systemNames.rend();
-         ++nameIt)
-    {
-        const auto basePath = fs::path{"control"} / *nameIt / cardFileName;
-
-        // Look in the override location first
-        auto confFile = fs::path{confOverridePath} / basePath;
-
-        if (!fs::exists(confFile))
-        {
-            confFile = fs::path{confBasePath} / basePath;
-        }
-
-        if (fs::exists(confFile))
-        {
-            FlightRecorder::instance().log(
-                "main", std::format("Loading configuration from {}",
-                                    confFile.string()));
-            load(JsonConfig::load(confFile));
-            FlightRecorder::instance().log(
-                "main", std::format("Configuration({}) loaded successfully",
-                                    confFile.string()));
-            log<level::INFO>(
-                std::format("Configuration({}) loaded successfully",
-                            confFile.string())
-                    .c_str());
-        }
-    }
 }
 
 void PCIeCardMetadata::load(const nlohmann::json& json)
diff --git a/control/json/utils/pcie_card_metadata.hpp b/control/json/utils/pcie_card_metadata.hpp
index c6b2083..dcdc9e5 100644
--- a/control/json/utils/pcie_card_metadata.hpp
+++ b/control/json/utils/pcie_card_metadata.hpp
@@ -33,8 +33,7 @@
  * fan floor index or temp sensor name based on its metadata, which
  * consists of 4 properties from the PCIeDevice D-Bus interface.
  *
- * The metadata is stored in one or more (see loadCards) JSON files, which
- * look like:
+ * The metadata is stored in a JSON file, which looks like:
  *  {
  *    "cards": [
  *      {
@@ -116,12 +115,8 @@
      * It will load a pcie_cards.json file in the default location if it
      * is present.
      *
-     * If systemNames isn't empty, it will load in any 'pcie_cards.json'
-     * files it finds in directories based on those names, overwriting any
-     * entries that were in any previous files.  This allows different
-     * floor indexes for some cards for the different systems in a flash
-     * image without needing to specify every possible card in every
-     * system specific JSON file.
+     * If systemNames isn't empty, it will load the first 'pcie_cards.json'
+     * files it finds in directories based on those names.
      *
      * If no valid config files are found it will throw an exception.
      *
