Separate the conversion and writing processes.