I know you have the script abort when there is more than one device but I just tried it on my Mac and I only had one device connected and it still says there are multiple devices. Is there any way to have the script prompt to select the correct device?