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

		channel = "device-#{uuid}-logs"

		# Redefine original function
		publish = (message) ->
			# Stop pubnub logging loads of "Missing Message" errors, as they are quite distracting
			message or= ' '
			pubnub.publish({ channel, message })

		# Replay queue now that we have initialised the publish function
		publish(args...) for args in publishQueue

	return -> publishQueue.push(arguments)

exports.kill = kill = (app) ->
	utils.mixpanelTrack('Application kill', app)
	updateDeviceInfo(status: 'Stopping')
	container = docker.getContainer(app.containerId)

			docker.getImage(app.imageId).inspectAsync()
			.catch (error) ->
				utils.mixpanelTrack('Application install', app)
				logSupervisorEvent('Installing application ' + app.imageId)
				updateDeviceInfo(status: 'Downloading')
				docker.createImageAsync(fromImage: app.imageId)
				.then (stream) ->
