small refactor to the control script, to change determination of paths