error handling for plugins