Improved error management in the plugin loader