Fix the wrong checking for UnixSerialIo