I posted the troub; e tree for code P0118 let me know what you find there. Thats a code for the coolant temp sensor. The P0401 is for egr low flow detected. Check to make sure the egr valve hose is hooked up and in good condition. ALso make sure the egr valve holds vacuum you will need a vacuum hand pump to do that. ALso pull a vacuum on the egr valve at idle and see if the engine wants to die?