add dependency checking for modules