Adding a error event listener to the serial port.