Add appDidTerminate event