diff --git a/DynareMain2.cc b/DynareMain2.cc
index 7d867831b690651765fbda20f48d12a17a94893d..bc5065b2d2c44f3957b415e81e530f61f6677d87 100644
--- a/DynareMain2.cc
+++ b/DynareMain2.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2008-2016 Dynare Team
+ * Copyright (C) 2008-2017 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -42,7 +42,7 @@ main2(stringstream &in, string &basename, bool debug, bool clear_all, bool clear
   ModFile *mod_file = p.parse(in, debug);
 
   // Run checking pass
-  mod_file->checkPass();
+  mod_file->checkPass(nostrict);
 
   // Perform transformations on the model (creation of auxiliary vars and equations)
   mod_file->transformPass(nostrict);
diff --git a/ModFile.cc b/ModFile.cc
index 862b686640f42ac28b79db84042ce6d6653c80fc..0d51bd0be2013d0313117d27e7ea3a16ed46e628 100644
--- a/ModFile.cc
+++ b/ModFile.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2016 Dynare Team
+ * Copyright (C) 2006-2017 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -107,7 +107,7 @@ ModFile::addStatementAtFront(Statement *st)
 }
 
 void
-ModFile::checkPass()
+ModFile::checkPass(bool nostrict)
 {
   for (vector<Statement *>::iterator it = statements.begin();
        it != statements.end(); it++)
@@ -299,19 +299,22 @@ ModFile::checkPass()
       exit(EXIT_FAILURE);
     }
 
-  // Check if some exogenous is not used in the model block
+  // Check if some exogenous is not used in the model block, Issue #841
   set<int> unusedExo = dynamic_model.findUnusedExogenous();
   if (unusedExo.size() > 0)
     {
-      warnings << "WARNING: some exogenous (";
-      for (set<int>::const_iterator it = unusedExo.begin();
-           it != unusedExo.end(); )
+      ostringstream unused_exos;
+      for (set<int>::iterator it = unusedExo.begin(); it != unusedExo.end(); it++)
+        unused_exos << symbol_table.getName(*it) << " ";
+
+      if (nostrict)
+        warnings << "WARNING: " << unused_exos.str()
+                 << "not used in model block, removed by nostrict command-line option" << endl;
+      else
         {
-          warnings << symbol_table.getName(*it);
-          if (++it != unusedExo.end())
-            warnings << ", ";
+          cerr << "ERROR: " << unused_exos.str() << "not used in model block. To bypass this error, use the `nostrict` option. This may lead to crashes or unexpected behavior." << endl;
+          exit(EXIT_FAILURE);
         }
-      warnings << ") are declared but not used in the model. This may lead to crashes or unexpected behaviour." << endl;
     }
 }
 
diff --git a/ModFile.hh b/ModFile.hh
index 506ddacc8dff20cf03b1a13a2b3cef51d515b32f..6ed24d33f767fa71c8c398c71935de040a6de4f7 100644
--- a/ModFile.hh
+++ b/ModFile.hh
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006-2016 Dynare Team
+ * Copyright (C) 2006-2017 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -128,7 +128,7 @@ public:
   void evalAllExpressions(bool warn_uninit);
   //! Do some checking and fills mod_file_struct
   /*! \todo add check for number of equations and endogenous if ramsey_policy is present */
-  void checkPass();
+  void checkPass(bool nostrict);
   //! Perform some transformations on the model (creation of auxiliary vars and equations)
   void transformPass(bool nostrict);
   //! Execute computations