Improved error reporting when calling require on a user defined extension