LPS-51043 Don't append new line at the end of CSV file

Hey @hhuijser, could you please take a look at this PR? the source formatter is complaining about something that I don't know exactly how to solve.

Regards,