Added ability to change root dir.