Check engine on and off

Hi

I have been experiencing check engine caution ON and OFF on my 2005 w203 benz after replacing up and downstream O2sensor when the Computer detected thank you 

And also what is the average mpg