Add output control logic