                         print ("Failure \(error)")
                         exit(EX_DATAERR)
                     })
-
-                    /*
-
-                    // #1 Compute the file path to chunk.
-                    var filePathToChunks=[String:[Chunk]]()
-                    for chunk in chunks{
-                        if !filePathToChunks.contains(where: { (k,v) -> Bool in
-                            return k==chunk.nodePath
-                        }){
-                            filePathToChunks[chunk.nodePath]=[Chunk]()
-                        }
-                        filePathToChunks[chunk.nodePath]!.append(chunk)
-                    }
-
-                    // #2 re-join the files
-                    var counter=0
-                    for (_,v) in filePathToChunks{
-                        let destinationFile=destinationFolder+v[0].nodePath
-                        let nodeNature=v[0].nodeNature
-
-                        if nodeNature == .file{
-
-                            let chunksPaths=v.map({ (chunk) -> String in
-                                return destinationFolder+"/.blocks"+chunk.relativePath //chunk.absolutePath
-                            })
-
-                            print ("Joining \(destinationFile)")
-                            chunker.joinChunksToFile(from: chunksPaths,
-                                               to: destinationFile,
-                                               decompress: true,
-                                               decrypt: true,
-                                               progression: { (progression) in
-                                                //
-                            }, success: { path in
-                                counter += 1
-                                print ("\(counter)/\(filePathToChunks.count) \(path)")
-                                if counter==filePathToChunks.count{
-                                    exit(EX_OK)
-                                }
-                            }, failure: { (message) in
-                                print("ERROR \(message)")
-                                exit(EX_DATAERR)
-                            })
-
-                        }else if nodeNature == .folder{
-                            counter += 1
-                            print ("\(nodeNature): \(counter)/\(filePathToChunks.count) \(destinationFile)")
-                            Async.utility{
-                                try? FileManager.default.createDirectory(atPath: destinationFile, withIntermediateDirectories: true, attributes: nil)
-                            }
-
-
-                        }else if nodeNature == .alias{
-                            counter += 1
-                            print ("\(nodeNature): \(counter)/\(filePathToChunks.count) \(destinationFile)")
-                            Async.utility{
-                                try? FileManager.default.createSymbolicLink(atPath: destinationFile, withDestinationPath: v[0].aliasDestination)
-                            }
-
-                        }
-
-                        if counter==filePathToChunks.count{
-                            exit(EX_OK)
-                        }
-                    }
-*/
-
                 }, failure: { (chunks, message) in
                     print(message)
                     exit(EX_DATAERR)

                    chunker.joinsChunks(chunks: chunks,
                                        assemblyFolderPath: destinationFolder,
                                        progression: { (progression) in
                        print (progression)
                    }, success: {
                        print ("Success")
                        exit(EX_OK)

        case "testChunkerDigest"?:
            let startTime=CFAbsoluteTimeGetCurrent()
            // Chunk trials
            let chunker=Chunker(fileManager: FileManager.default,cryptoKey:Bartleby.configuration.KEY,cryptoSalt:Bartleby.configuration.SHARED_SALT,mode:.digestOnly)
            // let folder=Bartleby.getSearchPath(FileManager.SearchPathDirectory.desktopDirectory)!
            // let folder="/Users/bpds/Documents/Entrepot/Autoformation/Videos"
