fprintf in LR Vugen

long txt;
int value1;

Web_Reg_Save_param("value1", .....);

txt = fopen ("c:\value1.txt","w ");
fprintf (txt,"%d",value1);
fclose (txt);

i am getting following error:

Error: C interpreter run time error in fprintf line