private String getPrefix(String fnm) {
        int pos;
        if ((pos = fnm.lastIndexOf(".")) == -1) {
            EIError.debugMsg("No prefix found for filename: ", EIError.ErrorLevel.Error);
            return fnm;
        } else {
            return fnm.substring(0, pos);
        }
    }