use block-write for bytes writing