public function storeThemeFile($toCdn, $file, $forceUpdate = false, $processReferences = false) {
		$mtime = @filemtime($file);
		$relativeName = self::CDN_THEME_PREFIX . '/' . $mtime . '/' . trim(str_replace(Director::baseFolder(), '', $file), '/');
		
		if (!$forceUpdate) {
			// see if the file already exists, if not we do NOT do an update
			$reader = $this->contentService->findReaderFor($toCdn, $relativeName);
			if ($reader && $reader->exists()) {
				return $reader->getURL();
			}
		}

		$clear = false;
		if ($processReferences) {
			$clear = true;
			$file = $this->processFileReferences($toCdn, $file, $forceUpdate);
		}

		// otherwise, lets get a content writer
		$writer = $this->contentService->getWriter($toCdn);
		try {
			$writer->write($file, $relativeName);
		} catch (Exception $e) {
			SS_Log::log($e, SS_Log::WARN);
		}

		if ($clear && strpos($file, '.cdn') > 0) {
			@unlink($file);
		}

		$id = $writer->getContentId();
		return $writer->getReader()->getURL();
	}