added check for existence of serial port device file