test/doc: example of writing+reading a file