Check module dependencies before loading packages