 				$scope.pdf.view = 'pdf'
 				$scope.shouldShowLogs = false
 
-				# make a cache to look up files by name
-				fileByPath = {}
-				for file in response.outputFiles
-					fileByPath[file.path] = file
 				# prepare query string
 				qs = {}
 				# define the base url. if the pdf file has a build number, pass it to the clsi in the url

			$scope.pdf.clsiMaintenance = false
			$scope.pdf.tooRecentlyCompiled = false
			$scope.pdf.renderingError = false

			if response.status == "timedout"
				$scope.pdf.view = 'errors'

				$scope.pdf.view = 'errors'
				$scope.pdf.failure = true
				$scope.shouldShowLogs = true
				fetchLogs(fileByPath['output.log'], fileByPath['output.blg'])
			else if response.status == 'clsi-maintenance'
				$scope.pdf.view = 'errors'
				$scope.pdf.clsiMaintenance = true
