Added ability to specifiy root directory