@Override
        public void run() {
            while(true) {
                try {
                    if(toCrawl.size() == 0 && manager.getCurrentSize() == 0) {
                        tries++;
//                        System.out.print("Try " + tries + "\r");
                        if(tries == maxTries) {
                            manager.stopCrawler();
                            if(manager.getQueueSize() == 0) {
                                System.exit(0);
                            } else {
                                System.out.println("Waiting for all threads to finish");
                                Thread.sleep(BaseConfig.PENDING_CHECK_RETRY);
                            }
                        }
                        Thread.sleep(BaseConfig.PENDING_CHECK_RETRY);
                    } else {
                        tries = 0;
                    }

                    if(toCrawl.size() > 0) {
                        System.out.print(
                                "Completed: " + manager.getCompletedCount() + ", " +
                                "Active: " + manager.getCurrentSize() + ", " +
                                "Pending " + toCrawl.size() + ", " +
                                "Thread queue " + manager.getQueueSize() + "\r"
                        );
                        manager.probe();
                    } else {
                        Thread.sleep(BaseConfig.DELAY);
                    }
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            }
        }