@Override
    protected void runImpl() throws ExecutionFailedException {
        Timer t = new Timer();

        debug("Loading components...");
        List<ConnectedComponent> components =
                ConnectedComponent.loadComponents(componentsFile.get());
        info(NumUtils.groupDigits(components.size()) + " components loaded from " + componentsFile.get());

        if (components.size() == 0) {
            throw new ExecutionFailedException("No components were found in input files! Can't continue the calculations.");
        }

        String compName = FileUtils.removeExtension(componentsFile.get().getName(), ".bin");
        File outDir = new File(workDir.get(), "vectors");
        outDir.mkdirs();
        debug(outDir + " directory was created for components file " + componentsFile.get().getName());
        featuresDirPr.set(outDir);


        // preparing
        BigLong2LongHashMap hm = new BigLong2LongHashMap(
                (int) (Math.log(availableProcessors.get()) / Math.log(2)) + 4, 12);
        for (ConnectedComponent component : components) {
            for (long kmer : component.kmers) {
                hm.put(kmer, 0);
            }
        }
        debug("Kmers in components = " + NumUtils.groupDigits(hm.size()));
        final long[] vector = new long[components.size()];
        debug("Memory used (before processing files) = " + Misc.usedMemoryAsString() + ", Time for preparing = " + t);


        int featuresFilesCount = (readsFiles.get() == null ? 0 : readsFiles.get().length)
                                  + (kmersFiles.get() == null ? 0 : kmersFiles.get().length);
        File[] featuresFiles = new File[featuresFilesCount];
        int curFiles = 0;

        if (readsFiles.get() != null) {
            for (File readsFile : readsFiles.get()) {
                hm.resetValues();
                IOUtils.calculatePresenceForReads(new File[]{readsFile}, k.get(), hm,
                        availableProcessors.get(), logger);

                File outFile = new File(outDir, ReadersUtils.readDnaLazy(readsFile).name() + ".vec");
                buildAndPrintVector(components, hm, threshold.get(), vector, outFile);
                info("Features for file " + readsFile.getName() + " printed to " + outFile);
                featuresFiles[curFiles] = outFile;
                curFiles++;
            }
        }

        if (kmersFiles.get() != null) {
            for (File kmersFile : kmersFiles.get()) {
                hm.resetValues();
                IOUtils.calculatePresenceForKmers(new File[]{kmersFile}, hm,
                        availableProcessors.get(), logger);

                File outFile = new File(outDir, FileUtils.removeExtension(kmersFile.getName(), ".kmers.bin") + ".vec");
                buildAndPrintVector(components, hm, threshold.get(), vector, outFile);
                info("Features for file " + kmersFile.getName() + " printed to " + outFile);
                featuresFiles[curFiles] = outFile;
                curFiles++;
            }
        }

        featuresFilesPr.set(featuresFiles);
        debug("Features-calculator has finished! Time = " + t);
    }