error handling for main plugin and ui module