write buf not updated