Add saving of parameter names to make loading of mh_mode-file compatible with mode_file option

(cherry picked from commit 7f15295cda5093e3d29ef8178bf81acf51e1dbb4)