Do a more graceful termination of the CP app