Better dependency check and error messages