public File getFile(String lfn, int resID)
    {
        if (lfn == null || resID == -1) {
            return null;
        }

        // sends a request to the RC
        int eventTag = DataGridTags.FILE_REQUEST;
        sendEvent(eventTag, lfn, resID);

        // waiting for a response from the resource
        Sim_type_p tag = new Sim_type_p(DataGridTags.FILE_DELIVERY);
        Sim_event ev = new Sim_event();
        super.sim_get_next(tag, ev);    // only look for this type of ack

        File file = null;
        try {
            file = (File) ev.get_data();
        }
        catch (Exception e) {
            file = null;
            System.out.println(super.get_name() + ".getFile(): Exception");
        }
        return file;
    }