added some config checking to plugin