to be readable and not throw eceptions on productio systems, but only when run in debug config.
removed filenamesearch for pluginLoaded.
Filenamesearch is not portable and cripples pythoncode unnecessarily. Use tha name you programmed into your plugin. It's shown in the right plugin window. USe that name if you're not the author of the plugin. Ask the author if he could name his plugin same as the filename to prevent unintentional double-loading of plugins.