A closed-loop control system that continuously measures excess oxygen in the flue gas and automatically fine-tunes the combustion air damper to maintain optimal combustion. This minimizes fuel waste and prevents unsafe, fuel-rich combustion conditions caused by changes in ambient temperature or fuel composition.