Refactored rootDirectory to be an option rather than a stand-alone
argument