added try/catch for serialPort opening