added end notificitaion code

Can you add query ID to the log statement