Added option to use local directory instead of repo