Close recursively to get submodules