def read(self, size):
        """
        Read wrapper.

        Parameters
        ----------
        size : int
          Number of bytes to read.
        """
        try:
            return_val = self.handle.read(size)
            if return_val == '':
                print()
                print("Piksi disconnected")
                print()
                raise IOError
            return return_val
        except OSError:
            print()
            print("Piksi disconnected")
            print()
            raise IOError