fix workDir argument
refactoring launchCommandIn private method