Re: code p0401 and p1504
Yes, tackle the P0401 first as the other code might be a cascade.
I'm not sure how you test the EGR for adequate flow, unless it is clearly plugged.
Don't forget to check the EGR Sensor (aka DPFE sensor). That is a very common failure point. It should be co-located with the EGR Valve. Check the hose and electrical connector.
I recently went through this with my '97 and replaced the EGR valve first, but the code came back. Then I replaced the sensor, and that did the trick.
If the car has over 100K on it, it might be best to replace both.