Wait for device instead of cancel script