Update error checking
Check gadget string length boundary