cfgfile_gen: improve printing of MainIp