add check loop into extend_modules_by_deps