         
         mainDirURL.subDirectories.forEach { subdir in
             guard let monitor = DTFolderMonitor(for: subdir, block: { [unowned self] in
-                self.enumerateVideoFiles(mainDirURL.path)
+                self.updateDownloadedFlagsByEnumeratingFilesAtPath(mainDirURL.path)
             }) else { return }
             
             subfoldersMonitors.append(monitor)

    }
    
    /// Updates the downloaded status for the sessions on the database based on the existence of the downloaded video file
    fileprivate func enumerateVideoFiles(_ path: String) {
        guard let enumerator = FileManager.default.enumerator(atPath: path) else { return }
        guard let files = enumerator.allObjects as? [String] else { return }
        
        // existing/added files
        for file in files {
            storage.updateDownloadedFlag(true, forAssetWithRelativeLocalURL: file)
            
            DispatchQueue.main.async {
                NotificationCenter.default.post(name: .DownloadManagerFileAddedNotification, object: file)
            }
        }
        
        if existingVideoFiles.count == 0 {
            existingVideoFiles = files
            return
        }
        
        // removed files
        let removedFiles = existingVideoFiles.filter { !files.contains($0) }
        for file in removedFiles {
            storage.updateDownloadedFlag(false, forAssetWithRelativeLocalURL: file)
            
            DispatchQueue.main.async {
                NotificationCenter.default.post(name: .DownloadManagerFileDeletedNotification, object: file)
            }
        }
    }

    
    func syncWithFileSystem() {
        let videosPath = Preferences.shared.localVideoStorageURL.path
        updateDownloadedFlagsByEnumeratingFilesAtPath(videosPath)
    }
    
    func monitorDownloadsFolder() {
