detect application installation and uninstall