Write quite works, just the last block to read and the file_offset and don't forget to optimise the reading