 
 module.exports = ->
 	# Load config file
-	config = fs.readFileAsync('/boot/config.json', 'utf8').then(JSON.parse)
+	userConfig = fs.readFileAsync('/boot/config.json', 'utf8').then(JSON.parse)
 
 	version = utils.getSupervisorVersion()
 

		Promise.all([
			knex('config').truncate()
			.then ->
				config
				.then (config) ->
					knex('config').insert([
						{key: 'uuid', value: uuid}
						{key: 'apiKey', value: config.apiKey}
						{key: 'username', value: config.username}
						{key: 'userId', value: config.userId}
						{key: 'version', value: version}
					])
			knex('app').truncate()

		division: ''
	)

	Promise.all([userConfig, keys, version])
	.then ([userConfig, keys, version]) ->
		console.log('UUID:', uuid)
		console.log('User ID:', userConfig.userId)
		console.log('User:', userConfig.username)
		console.log('Supervisor Version:', version)
		console.log('API key:', userConfig.apiKey)
		console.log('Application ID:', userConfig.applicationId)
		console.log('CSR :', keys.csr)
		console.log('Posting to the API..')
		userConfig.csr = keys.csr
		userConfig.uuid = uuid
		userConfig.version = version
		return request(
			method: 'POST'
			url: url.resolve(config.apiEndpoint, 'associate')
			json: userConfig
		)
	.spread (response, body) ->
		if response.statusCode >= 400
