Modify the function to kill running apps