diff --git a/common/include/Dict.hpp b/common/include/Dict.hpp
index dda547b91971a7d643523383b51db00343b90488..031d463f417047a3529f17f7b2c15c102e04c50c 100644
--- a/common/include/Dict.hpp
+++ b/common/include/Dict.hpp
@@ -54,7 +54,7 @@ class Dict
   std::size_t size() const;
   int getNbOccs(int index) const;
   void removeRareElements();
-  void loadWord2Vec(std::filesystem::path path, std::string prefix);
+  bool loadWord2Vec(std::filesystem::path path, std::string prefix);
   bool isSpecialValue(const std::string & value);
 };
 
diff --git a/common/src/Dict.cpp b/common/src/Dict.cpp
index d4e7ba2ff7073d5cd94f3c1cb5ed3ad4d36221f7..10cc040d4ad9c272ad9548be1bf526b56f698760 100644
--- a/common/src/Dict.cpp
+++ b/common/src/Dict.cpp
@@ -223,10 +223,10 @@ void Dict::removeRareElements()
   nbOccs = newNbOccs;
 }
 
-void Dict::loadWord2Vec(std::filesystem::path path, std::string prefix)
+bool Dict::loadWord2Vec(std::filesystem::path path, std::string prefix)
 {
    if (path.empty())
-    return;
+    return false;
 
   if (!std::filesystem::exists(path))
     util::myThrow(fmt::format("pretrained word2vec file '{}' do not exist", path.string()));
@@ -238,6 +238,7 @@ void Dict::loadWord2Vec(std::filesystem::path path, std::string prefix)
   char buffer[100000];
 
   bool firstLine = true;
+  bool pretrained = false;
 
   try
   {
@@ -262,6 +263,7 @@ void Dict::loadWord2Vec(std::filesystem::path path, std::string prefix)
         continue;
       }
 
+      pretrained = true;
       auto splited = util::split(util::strip(buffer), ' ');
 
       if (splited.size() < 2)
@@ -287,6 +289,8 @@ void Dict::loadWord2Vec(std::filesystem::path path, std::string prefix)
     util::myThrow(fmt::format("file '{}' is empty", path.string()));
 
   setState(originalState);
+
+  return pretrained;
 }
 
 bool Dict::isSpecialValue(const std::string & value)
diff --git a/torch_modules/src/ContextModule.cpp b/torch_modules/src/ContextModule.cpp
index 2e9a383d1a99591b9d137b05654e2cf7450af57b..6629b18eb876b400af5024d03334640e03951b08 100644
--- a/torch_modules/src/ContextModule.cpp
+++ b/torch_modules/src/ContextModule.cpp
@@ -58,9 +58,13 @@ ContextModuleImpl::ContextModuleImpl(std::string name, const std::string & defin
                 auto splited = util::split(p, ',');
                 if (splited.size() != 2)
                   util::myThrow("expected 'prefix,pretrained.w2v'");
-                getDict().loadWord2Vec(this->path / splited[1], splited[0]);
-                getDict().setState(Dict::State::Closed);
-                dictSetPretrained(true);
+
+                auto pretrained = getDict().loadWord2Vec(this->path / splited[1], splited[0]);
+                if (pretrained)
+                {
+                  getDict().setState(Dict::State::Closed);
+                  dictSetPretrained(true);
+                }
               }
             }
 
diff --git a/torch_modules/src/ContextualModule.cpp b/torch_modules/src/ContextualModule.cpp
index 8b76987b2b5863b1365fbe58135c14cb9e8ec425..4829596734cd484ca4cc0552fffbb693eb567770 100644
--- a/torch_modules/src/ContextualModule.cpp
+++ b/torch_modules/src/ContextualModule.cpp
@@ -63,9 +63,12 @@ ContextualModuleImpl::ContextualModuleImpl(std::string name, const std::string &
                 auto splited = util::split(p, ',');
                 if (splited.size() != 2)
                   util::myThrow("expected 'prefix,file.w2v'");
-                getDict().loadWord2Vec(this->path / splited[1], splited[0]);
-                getDict().setState(Dict::State::Closed);
-                dictSetPretrained(true);
+                auto pretrained = getDict().loadWord2Vec(this->path / splited[1], splited[0]);
+                if (pretrained)
+                {
+                  getDict().setState(Dict::State::Closed);
+                  dictSetPretrained(true);
+                }
               }
             }
 
diff --git a/torch_modules/src/FocusedColumnModule.cpp b/torch_modules/src/FocusedColumnModule.cpp
index 1ef134b8aaa3eec525b7d9f78dd18c1bf5707039..08d5945fc5c1dfb72df69aedadfaadfc310d0326 100644
--- a/torch_modules/src/FocusedColumnModule.cpp
+++ b/torch_modules/src/FocusedColumnModule.cpp
@@ -49,9 +49,12 @@ FocusedColumnModuleImpl::FocusedColumnModuleImpl(std::string name, const std::st
                 auto splited = util::split(p, ',');
                 if (splited.size() != 2)
                   util::myThrow("expected 'prefix,pretrained.w2v'");
-                getDict().loadWord2Vec(this->path / splited[1], splited[0]);
-                getDict().setState(Dict::State::Closed);
-                dictSetPretrained(true);
+                auto pretrained = getDict().loadWord2Vec(this->path / splited[1], splited[0]);
+                if (pretrained)
+                {
+                  getDict().setState(Dict::State::Closed);
+                  dictSetPretrained(true);
+                }
               }
             }