write generated code to buffer before committing to file, intention of checking ast's