Improved dependency check to avoid showing already installed packages