public void loadWebPage(String url) {
        webPageUrl = url;
        View.print("Fetching " + webPageUrl);
        View.print("Please wait..");

        Document doc = getWebPageFromUrl(webPageUrl);

        if (doc == null) {
            View.print(webPageUrl + " CAN NOT be opened!");
        } else {
            TreeMap<Integer, String> newLinks = new TreeMap<>();
            newLinks = getLinksFromDocument(doc);

            if (storage.getDocument(url) != null) { // exists in storage
                View.print("Document loaded from storage!");
                storage.getDocument(url).setLastTimeUsed(new Date());
                storage.getDocument(url).increaseNumberOfUses();

                File input = new File(storage.getDocument(url).getDocumentPath());

                TreeMap<Integer, String> oldLinks = null;
                try {
                    Document fileDoc = Jsoup.parse(input, "UTF-8");
                    oldLinks = new TreeMap<>();
                    oldLinks = getLinksFromDocument(fileDoc);
                } catch (IOException ex) {

                    View.print("" + ex.getMessage());
                }

                if (oldLinks != null && !oldLinks.equals(newLinks)) {
                    View.print("New document version available online!");
                    links.clear();
                    for (Map.Entry<Integer, String> entry : newLinks.entrySet()) {
                        links.put(entry.getKey(), entry.getValue());
                    }
                    storage.getDocument(url).increaseNumberOfChanges();

                    storage.saveHtmlDocumentToFile(doc, storage.getDocument(url).getDocumentPath());

                    File file = new File(storage.getDocument(url).getDocumentPath());
                    storageSize += (file.length() / 1024) - storage.getDocument(url).getDocumentSize();

                    storage.getDocument(url).setDocumentSize(file.length() / 1024);
                    View.print("Document from storage updated!");
                } else if (oldLinks != null) {
                    links.clear();
                    for (Map.Entry<Integer, String> entry : oldLinks.entrySet()) {
                        links.put(entry.getKey(), entry.getValue());
                    }
                } else {
                    View.print("Error! Document links from storage equals null :/");
                }
            } else {
                links.clear();
                for (Map.Entry<Integer, String> entry : newLinks.entrySet()) {
                    links.put(entry.getKey(), entry.getValue());
                }

                String outputFile = storagePath + File.separator
                        + (FILE_NAME++) + FILE_SUFIX;

                storage.saveHtmlDocumentToFile(doc, outputFile);

                File file = new File(outputFile);

                HtmlDocument htmlDocument = new HtmlDocument(webPageUrl,
                        file.length() / 1024, outputFile, FILE_NAME);

                storage.addDocument(htmlDocument);

                View.print("Document fetched from " + webPageUrl + "and saved in storage!");
            }
        }
    }