Add dependency check in build