factored out subrun code in launch to subrun.scm