fixed -wd parameter for custom working directory