More difficult than I thought!

The filename of the CSV file is set with this:

Code
string signals_csv()
{
	return slash(strf("%sData\\%d_%s_%s_%i.csv", ZorroFolder, WFOCycle, Script, strx(Asset,"/",""), Core));
}



I thought I'd just put this at the beginning of my trading script:

Code
	if(file_length(signals_csv()) > 0)
	{
		adviseLong(NEURAL, 0, 0);  //don't want to lose all the convenience!!!
		return;
	}


I want adviseLong to trigger the neural.train() in R for me.

In neural(NEURAL_TRAIN, ...) I'm preventing the CSV from being overwritten with:

Code
if(file_length(name == 0)) file_write(name,Data,0);


However, the training in R isn't triggered. Why?