 	///   - observer: observer to signal data/completed or error
 	private func loadContents(file: File, observer: Signal<Data, Rc2Error>.Observer) {
 		let fileUrl = cachedUrl(file: file)
-		guard fileUrl.fileExists() else {
+		//for some unknown reason the cached file could be empty and cause a crash
+		guard fileUrl.fileExists() && fileUrl.fileSize() > 0 else {
 			self.recache(file: file).startWithResult { result in
 				guard result.error == nil else {
 					observer.send(error: result.error!)

	fileprivate let saveQueue: DispatchQueue
	fileprivate let taskLockQueue: DispatchQueue
	fileprivate var downloadAll: DownloadAll?
	
	lazy var fileCacheUrl: URL = { () -> URL in
		var fileDir: URL? = nil

					self.downloadAll?.observer.sendCompleted()
					self.downloadAll = nil
				}
				self.lastModTimes[dloadTask.file.fileId] = Date.timeIntervalSinceReferenceDate
				self.tasks.removeValue(forKey: urlTask.taskIdentifier)
				if generatedError != nil {
					os_log("failure downloading file %d: %{public}s", log: .network, type: .error, dloadTask.file.fileId, generatedError!.errorDescription ?? "unknown")
