Added error detection when no plugin is present or user presses cancel