private function saveInstallationMap($result = array())
	{
		//
		// Temporarily remove original checksums
		//

		if (isset($this->installationMap['__CHECKSUMS__'])) {
			$original_checksums = $this->installationMap['__CHECKSUMS__'];

			unset($this->installationMap['__CHECKSUMS__']);

		} else {
			$original_checksums = array();
		}

		if ($result && isset($result['updates'])) {
			foreach ($result['updates'] as $opus_path => $checksum) {
				$original_checksums[$opus_path] = $checksum;
			}
		}

		$this->installationMap['__CHECKSUMS__'] = $original_checksums;

		//
		// Write our map
		//

		if (file_exists($this->mapFile)) {
			if (!is_writable($this->mapFile) || is_dir($this->mapFile)) {
				throw new \Exception(sprintf(
					'Cannot write to map file at %s', $this->mapFile
				));
			}

		}

		if (!file_put_contents($this->mapFile, json_encode($this->installationMap))) {
			throw new \Exception(sprintf(
				'Error while saving map file at %s', $this->mapFile
			));
		}
	}