Hi Bhushan. Do you use a development environment that allows for step-wise debugging? It would be helpful to put a breakpoint in your event listener to see if it is being invoked.
How are you producing the output? Would you please post the relevant code?
You might find my answer to another event-listener-related post helpful.