Also abandoned closing the serial port for now because it prevents program closing