factored out duplicated code in SimLauncher.js