Fixing abstraction for error messages based on if the function is loaded from the extension or not