add crash event listener