Free write buffers before merge sort