added checking of SerialException