fixes #3138 . Update statistics after operation is run and  before resp...

...onse is send to client
I don't know. Currently afterResponse is not used. And not sure what we will use it for in the future. 
I may give the exception(if any ) as parameter to afterResponse so that future implementer could decide what to do with it. wdyt?