When the USB serial component is initialised it will wait for the device to be enumerated with a device driver on the computer. If this happens then your program should then be able to proceed. You can specify a timeout for this in the USB Serial component properties, the default being to wait forever.