Fixed up the regex and generated code, needs  more work
Now uses writeFile
Fixed test for the F expression