You need to find what is the reason for the Check engine light coming on, once you determine that we can get you going in the right direction. Know this, high NOx is caused by too much timing advance, non functioning or restricted EGR system, exhaust leak prior to the catalyst, engine operating temperature being too high, excessively lean mixture and finally bad reduction bed in the three way catalyst. Since your HC and CO emissions are okay, you would have to look at the catalyst, but I would not until I know what triggered the Check engine light to come on. Good luck