 			return
 		throw err
 	.tap ->
-		utils.mixpanelTrack('Application stop', app.imageId)
+		logSystemEvent(logTypes.stopAppSuccess, app)
 		knex('app').where('id', app.id).delete()
 
 isValidPort = (port) ->

				updatingPromises = toBeUpdated.map (imageId) ->
					localApp = apps[imageId]
					app = remoteApps[imageId]
					utils.mixpanelTrack('Application update', app)
					logSystemEvent('Updating application')
					kill(localApp)
					.then ->
						start(app)

		containerPromise.catch ->
			fetch(app)
			.then (imageInfo) ->
				logSystemEvent(logTypes.installApp, app)
				updateDeviceState(status: 'Installing')

				ports = {}
