added debug to plugin api