[CW] - fix recursive writeData