public static void main(String[] args) {
        if (args.length < 3 || (! args[0].startsWith("-b") && ! args[0].startsWith("-s") && !args[0].startsWith("-c")) ){
            System.err.println("usage: com.github.dyamah.sjdat.tools.MkTrie -[b|s|c] trie keys");
            System.exit(1);
        }

        if (args[0].startsWith("-b")){
            System.err.println("<< Build Mode >>");
            bm.showHeader();
            List<String> keys = readKeys(new File(args[2]));
            Trie trie = buildTrie(keys);
            checkTrie(trie, keys);
            save(trie, new File(args[1]));
            bm.showTotal();
            System.err.println();
            System.err.println("<< Trie Info. >>");
            System.err.println("\t#keys      : " + trie.numberOfKeys());
            System.err.println("\t#nodes     : " + trie.numberOfNodes());
            System.err.println("\t#free nodes: " + trie.numberOfFreeNodes());
        }

        if (args[0].startsWith("-s")){
            System.err.println("<< Search Mode >>");
            bm.showHeader();
            Trie trie =load(new File(args[1]));
            List<String> keys = readKeys(new File(args[2]));
            lookup(trie, keys, false);
            bm.showTotal();
        }

        if (args[0].startsWith("-c")){
            if (args.length < 4){
                System.err.println("usage: com.github.dyamah.sjdat.tools.MkTrie -c trie train test");
                System.exit(1);
            }
            System.err.println("<< Check Mode >>");
            bm.showHeader();
            List<String> train = readKeys(new File(args[2]));
            Trie trie = buildTrie(train);
            checkTrie(trie, train);
            save(trie, new File(args[1]));
            trie =load(new File(args[1]));
            List<String> test = readKeys(new File(args[3]));
            validation(trie, train, test);
            bm.showTotal();
        }

    }