moved PluginError to plugin and fixed references