improve dependency check