Hi Bravo and welcome to Just answer.com, Super mechanic here. About your XL7.
The trouble code P0128 is an indication that the coolant temperature is below the desired thermostat regulated temperature. All that means is either the coolant temp sensor is sending a false reading, (bad sensor) or, the thermostat is not working right. It may be staying opened for too long, or it's just getting "lazy"
The trouble code P0401 is an indication that the EGR flow, (exhaust gas recirculation) is insufficient. That might be a bad EGR valve, but I would check the EGR passages first. They sometimes tend to get a little resticted with carbon. If they are, you can clean them out with a small wire and some throttle body cleaner and clear the codes and see how she does. Thanks
Remember you DO NOT have to accept until you are 100% satisfied with the answer, but, *WE DON'T GET PAID* unless you hit *ACCEPT*