add_block implementation.
write implementation.
Bugs fixes in read.