add a writer for max_buffer_size, + tests