diff --git a/Geo/GeoStringInterface.cpp b/Geo/GeoStringInterface.cpp
index 2e4e44c8a468d38760504fb3e4d9b8e338b6f9cc..182ac6cd06e991398d95ba2f1e02609a3235e0a5 100644
--- a/Geo/GeoStringInterface.cpp
+++ b/Geo/GeoStringInterface.cpp
@@ -55,7 +55,7 @@ void add_infile(const std::string &text, const std::string &fileName, bool force
         if(CTX::instance()->confirmOverwrite) {
           if(!StatFile(newFileName)){
             std::ostringstream sstream;
-            sstream << "File '" << fileName << "' already exists.\n\n"
+            sstream << "File '" << newFileName << "' already exists.\n\n"
               "Do you want to replace it?";
             if(!Msg::GetAnswer(sstream.str().c_str(), 0, "Cancel", "Replace"))
               return;