improve err msg about oob in io_read_bytes