diff --git a/preprocessor/ComputingTasks.cc b/preprocessor/ComputingTasks.cc
index 3b277f9eaf30f33e594990303bfd2b9f4c8ba685..e8e1c71f1a27f1c982aaf687a3c319dc80ff8cc0 100644
--- a/preprocessor/ComputingTasks.cc
+++ b/preprocessor/ComputingTasks.cc
@@ -1295,10 +1295,11 @@ SvarIdentificationStatement::writeOutput(ostream &output, const string &basename
 	    {
 	      int col = (it->lag-1)*n+it->variable+1;
 	      if (col > k)
-                     {
-                       cerr << "ERROR: lag =" << it->lag << ", num endog vars = " << n << "current endog var index = " << it->variable << ". Index "
-                            << "out of bounds. If the above does not represent a logical error, please report this to the Dyanre Team." << endl;
-                     }
+                {
+                  cerr << "ERROR: lag =" << it->lag << ", num endog vars = " << n << "current endog var index = " << it->variable << ". Index "
+                       << "out of bounds. If the above does not represent a logical error, please report this to the Dyanre Team." << endl;
+                  exit(EXIT_FAILURE);
+                }
 	      output << "options_.ms.Ri{" << it->equation << "}(" << it->restriction_nbr << ", " << col << ") = ";
 	      it->value->writeOutput(output);
 	      output << ";" << endl;