added file mode to code generation to enable runnable scripts