public static void main(String... args) {
        if (args.length > 0) {
            String location = "",
                    type = "";
            for (String arg : args) {
                if (arg.contains(PARAM_LOCATION)) {
                    LOGGER.debug(String.format("Argument found: %s", arg));
                    location = arg;
                    location = location.replace(PARAM_LOCATION, "");
                } else if (arg.contains(PARAM_TYPE)) {
                    type = arg;
                    type = type.replace(PARAM_TYPE, "");
                }
            }
            if (StringUtils.isNotEmpty(location)) {
                InputStream inputStream;
                try {
                    if (type.equals(PARAM_TYPE_INPUT_STRING)) {
                        inputStream = getInputStreamFromString(location);
                    } else if (type.equals(PARAM_TYPE_URL)) {
                        inputStream = getInputStreamFromURL(new URL(location));
                    } else if(type.equals(PARAM_TYPE_FILE_LOC)) {
                        inputStream = getFileInputStream(new File(location));
                    } else {
                        inputStream = getFileInputStream(new File(location));
                    }
                    String resultLocation = ParseDocument.parseDocument(inputStream);
                    LOGGER.info(String.format("Document parsed and saved @ location %s", resultLocation));
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        } else {
            LOGGER.error("Missing arguments. Legal arguments is: \n -t=<type> \n -l=<location{url,file}>");
        }
    }