diff --git a/source/adios2/core/ADIOS.cpp b/source/adios2/core/ADIOS.cpp
index acd211aae52fccafae890d727a2ada7a630be3f7..af7020254e84fd396c9e4c8be71c984deef9b8f0 100644
--- a/source/adios2/core/ADIOS.cpp
+++ b/source/adios2/core/ADIOS.cpp
@@ -82,7 +82,7 @@ IO &ADIOS::DeclareIO(const std::string ioName)
 IO &ADIOS::GetIO(const std::string name)
 {
     auto itIO = m_IOs.find(name);
-    if (itIO == m_IOs.end())
+    if (m_DebugMode && itIO == m_IOs.end())
     {
         throw std::invalid_argument(
             "ERROR: Unable to find previously defined IO object with name \"" +