public static void createDirectory(Path directory) throws IOException {
        if (directory == null) {
            IllegalArgumentException iae = new IllegalArgumentException("The directorypath is null or points to an invalid location!");
            Main.handleUnhandableProblem(iae);
        }

        Files.createDirectories(directory);
    }