Fix to stop execution if the ActiveDirectory module cannot be imported