Added closure of connection on exit, removed USBListener, as it was unnecessary