basic file writing (still indent issue with generated code)