updated to use passed in plugin added logging