Integrate c++ record writer code