catch exception on plugin loading