Added debugging to serial port selection