add array_spec.dms
switch exec mode by scriptMode argument