Cant write new files with cffile without leaving first line blank!!

I am trying to write an application that would read data from a database into
a csv file.
The csv file is now used to feed another database system.

The issue is while writing into the file i use the following method:
<cffile action="WRITE" file="#variabl#" output=" " addnewline="Yes">

this was supposed to take care and ensure that after looping through the query
record set the new file being written wont overwrite the last.

<cfloop query="getdata2">
<cffile action="APPEND" file="#CSVDfile#"
output="000000000#cod_cc_brn#,0000000#trim(cod_acc t_no)#,#nutitle#,#DATEFORMAT(n
ow()-1" addnewline="Yes">
</cfloop>

Issue is if i dont put the initial line the file is appended over and over
again for different loop scenarios, rather than at a single time only.

Kindly assist guys my deadline has long lapsed --HEEEEEEELLLLPPPPP!!!!!

GOC.