added check for already loaded plugin