If the Flat File composer receives an empty class, it produces an empty line.
For flat file composing, you need to check if the flat file record contains data when building the flat file structure, e.g. by using the exists() operation when appending records to the data object.