 				$scope.pdf.view = 'errors'
 				$scope.pdf.failure = true
 				$scope.shouldShowLogs = true
-				fetchLogs(fileByPath)
+				fetchLogs(fileByPath, {pdfDownloadDomain:pdfDownloadDomain})
 			else if response.status == 'clsi-maintenance'
 				$scope.pdf.view = 'errors'
 				$scope.pdf.clsiMaintenance = true

						compileGroup:ide.compileGroup
						clsiserverid:ide.clsiServerId
				if file?.url?  # FIXME clean this up when we have file.urls out consistently
					opts.url = file.url
				else if file?.build?
					opts.url = "/project/#{$scope.project_id}/build/#{file.build}/output/#{name}"
				else
					opts.url = "/project/#{$scope.project_id}/output/#{name}"
				# check if we need to bust cache (build id is unique so don't need it in that case)
				if not file?.build?
					opts.params.cache_bust = "#{Date.now()}"

				qs.popupDownload = true
				$scope.pdf.downloadUrl = "/project/#{$scope.project_id}/output/output.pdf" + createQueryString(qs)

				fetchLogs(fileByPath, {pdfDownloadDomain:pdfDownloadDomain})

			IGNORE_FILES = ["output.fls", "output.fdb_latexmk"]
			$scope.pdf.outputFiles = []
