cleanup, and theory on why serialport.open hangs