Added invokePlugin method.