Return -EIO in case of -1 in case of a read error