render_code function

Generate a file with formatted code