The P0401 is a code most should read up on. I've seen guys spend tons trying to find an EGR problem. Go to GearChatter.com and look up an F body tech DTC on this code (it's a GM FSM essentially). It'll point out in the diagnostic aids that flow is measured by the map sensor. And if you aren't getting any other EGR codes for lack of movement etc.. usually it's not an EGR problem.
If your map isn't reading airflow properly you could be fuelling incorrectly as well, hence the P0171