Added retry on transfer and exit for USB