Any text in the export file that is no code word is output for the export.
So, if you put that header between the filename declaration and the first $loop() statement, it will be output to the file only once.
I do not know what you mean by that. Any file with the same name overwrites an existing one. You can disable messages in Tools>Options>Messages and see if that works for you.
<?xml version="1.0" encoding="UTF-8"?>
<PRODUCT Name="rekordbox" Version="4.3.1" Company="Pioneer DJ"/>
A. F. Study II
Altsein als Alternative zum Altern
As If In A Dream
I do not see any repetition outside the $loop() statement.