Added some try-catch to handle device reset
Merge branch 'serial_reset'