Added CodeGenerator to write the formatted code to file