added check for existing submodule source directory