diff --git a/examples/DDG4/src/HitTupleAction.cpp b/examples/DDG4/src/HitTupleAction.cpp
index b77d1a0ed4a2fd58a591927a6b16307527fc9441..f690f2784b9f8c02b45f5daf2d1aacc796533398 100644
--- a/examples/DDG4/src/HitTupleAction.cpp
+++ b/examples/DDG4/src/HitTupleAction.cpp
@@ -175,7 +175,7 @@ void myanalysis::HitTupleAction::end(const G4Event* event)    {
         }
       }
       else   {
-        except("HitTupleAction","Failed to open ROOT N-tuple file: "+m_outFileName);
+        except("HitTupleAction","Failed to open ROOT N-tuple file: %s",m_outFileName.c_str());
       }
     }
     for ( auto& e : m_deposits )  {