Loop over parameters inside the mod file

Please have a look at the structure outlined at [Loop over parameters). You must loop outside of the mod-file, not within.