public static void blockUntilProcessEnd(Process process, int timeOut) {
        int maxCount = timeOut * 5;
        for (int i = 0; i < maxCount && checkProcessEnd(process); i++) {
            try {
                Thread.sleep(200);
            } catch (InterruptedException e) {
                logger.error(e);
            }
        }
    }