private static boolean isLanguageModelCreated(String grammar, boolean deleteOnExit){
        boolean isLanguageModelCreated = false;
        // Ensure that the files were created successfully
        File lm = new File(grammar + ".lm");
        File dmp = new File(grammar + ".DMP");
        // Check if the files exists
        if(lm.exists() && lm.isFile() && dmp.exists() && dmp.isFile()){
            // Delete files when the program exists
            if(deleteOnExit){
                lm.deleteOnExit();
                dmp.deleteOnExit();
            }
            // The Language Model was created successfully
            isLanguageModelCreated = true;
        }
        return isLanguageModelCreated;
    }