Rename data to chunk in write function
Align example with readme