public String verifyAndCleanPath(String path) {
        String[] paths = getAllDirectories(path);
        //ugly use to handle duplicates.
        LinkedHashMap<String,Integer> verifiedPaths = new LinkedHashMap<String,Integer>(){
            @Override
            public Integer put(String s, Integer i) {
                if (get(s)!=null) {
                    System.err.println("warning removed duplicate.");
                }
                return super.put(s,i);
            }
        };
        for (int i = 0; i < paths.length; i++) {
            try {
                verifiedPaths.put(verifyAndCleanDir(paths[i]),0);
            } catch (IOException | NullPointerException e) {
                //todo add some kind of storage to not bother users constantly
                switch (promptRemoveDirectoryFromPath(paths[i],e)) {
                    case JOptionProxy.YES_OPTION:
                        //do nothing
                        break;
                    case JOptionProxy.NO_OPTION:
                        //do not remove it by adding it
                        verifiedPaths.put(paths[i],1);
                        break;
                    case JOptionProxy.CLOSED_OPTION:
                        //todo Cancel whole sequence?
                        verifiedPaths.put(paths[i],1);
                        break;
                };

            }
        }
        return String.join(iRegistryHandler.getPathDelimiter(), verifiedPaths.keySet());
    }