public static void checkIsFile(File file) {
        if (file.isDirectory()) {
            log.error("File is not file. File name = " + file.getAbsolutePath());
            throw new RuntimeException(file.getAbsolutePath());
        }
    }