Added example code on how to use the dirty change event hook.