What you are doing is not a proper loop. The full call to Dynare will override all settings in the m-file. See