Logging data from a usb or serial port