Write data to a plain text file by adding titles of the columns as a first line

Hello,


I'm processing an *.sdf file and I want some data to write as a plain text file but in a way that for each data column in the text file I want a column name(s) as a first line (see below). A already achieved this in two steps (see attached picture):

1. Constructed the title (Custom Manipulator) that is connected directly to the TextWriter component.

2. Processing *.sdf, formating needed data (Custom Manipulator) and writing the data to the same Text Writer component.

If I do the same in a single pipeline, expectedly the title line will be written as many times as the number of structures filtered. Is there an elegant way to construct the titles just after the Bump Check component and to write just once in the text file, since if everything go on the green port, there is not needed to write the data?

Thanks,

Nikola

Compound BumpingAtom1 BumpingAtom2 BumpingDistance  
 comp047           69           44         1.507 Å  
 comp129           33           28         2.270 Å  
 comp129           63           58         1.070 Å  
 comp129           58           27         1.995 Å  
 comp129           58           27         1.993 Å  
 comp129           64           57         1.002 Å  
 comp147           58           51         1.346 Å  
​​​​​​​ comp147           58           51         1.341 Å