added checking of successfully adding serial port