public String getProvinceHistoryFile(final int provId) {
        // Can't use resolveFilename, because we don't know what the file is
        // called.
        if (usingMod) {
            if (replaced.contains("history")) {
                // Case 1: History is replaced.
                // If there is a file in the mod's province history folder that
                // starts with the provId, return it.
                // Otherwise, return null.
                return getFile(modDirName + "history/provinces", Integer.toString(provId), true);
            } else if (extended.contains("history")) {
                // Case 2: History is extended.
                // If there is a file in the mod's province history folder that
                // starts with the provId, return it.
                // Otherwise, try to return the vanilla file.
                String filename = getFile(modDirName + "history/provinces", Integer.toString(provId), true);
                if (filename != null)
                    return filename;
                else
                    return getVanillaProvHistoryFile(provId);
            } else {
                // Case 3: History is not modded.
                // Try to return the vanilla file.
                return getVanillaProvHistoryFile(provId);
            }
        } else {
            // No mod. Try to return the vanilla file.
            return getVanillaProvHistoryFile(provId);
        }
    }