Not sure I get why the outer loop is needed, wouldn't "next if path.include?("-usb-")" suffice?