CSV Writer Node hen egg problem

Hello together,

I have a problem with the CVS Writer Node. I created a workflow that reads text files and processes them according to certain criteria. From these text files I would like to write certain areas in separate CSV files. Filtering works, the variable writing of the CSV works and the whole in several loops. So far as so well. My problem is that the CVS Writer Node don’t care about the number or position of the columns. In the forum, I have already found solutions to help with the Column Appender Node if you have an existing CSV file. And that is exactly my hen egg problem.

The names of the CSV files to be written are not known during the first run of the workflow and new CSV files can arise during a cyclical procedure (e.g. Via batch mode). The whole thing is of course variable, which means that, for example, 20CSV files can arise from a read-in text file, from the next none or perhaps only one. What must my workflow look like at this point, that the first empty CSV file is written with the correct name, then this empty CSV file must be loaded again and compared with the data in the workflow and saved again?

Attached is a screeshot from my workflow section

The CSV Write Node (Node 142) crashes when the file not exists yet.

Has anybody an idea how to solve that problem?

Thanks, Brotfahrer