Added ability to customize base directory