Added wd option for default working directory