Adding working directory as an optional parameter (not always $HOME)