diff --git a/matlab/+occbin/DSGE_smoother.m b/matlab/+occbin/DSGE_smoother.m
index 265f631cb94878447a8309a742e76b5bdf9c88ca..2a5d919d53a64070ed381babd76c51f5ec127b3f 100644
--- a/matlab/+occbin/DSGE_smoother.m
+++ b/matlab/+occbin/DSGE_smoother.m
@@ -185,7 +185,9 @@ while is_changed && maxiter>iter && ~is_periodic
     [alphahat,etahat,epsilonhat,ahat,SteadyState,trend_coeff,aK,T0,R0,P,PK,decomp,Trend,state_uncertainty,M_,oo_,bayestopt_] = DsgeSmoother(xparam1,gend,Y,data_index,missing_value,M_,oo_,options_,bayestopt_,estim_params_,occbin_options,TT,RR,CC);%     T1=TT;
     sto_etahat(iter)={etahat};
     regime_history0(iter,:) = regime_history;
-    save('info1','regime_history0');
+    if occbin_smoother_debug
+        save('info1','regime_history0');
+    end
     
     sto_CC = CC;
     sto_RR = RR;