@Override
  public void processCas(CAS aCAS) throws ResourceProcessException {
    
    JCas jcas;
    try {
      jcas = aCAS.getJCas();
    } catch (CASException e) {
      throw new ResourceProcessException(e);
    }

    File collectionFile = new File(((String) getConfigParameterValue(PARAM_OUTPUT)).trim());
    
    BufferedWriter bufferedWriter = null;

    try {

      // Construct the BufferedWriter object
      bufferedWriter = new BufferedWriter(new FileWriter(collectionFile, true));

      
      FSIterator git = jcas.getAnnotationIndex(IndividualGeneIdentifier.type).iterator();
      if (git.hasNext())
      {
        IndividualGeneIdentifier indivGene = (IndividualGeneIdentifier) git.next();
        String gID = indivGene.getSentenceID();
        int gStart = indivGene.getGeneStart();
        int gEnd = indivGene.getGeneEnd();
        String theGene = indivGene.getGeneString();
        bufferedWriter.write(gID + "|" + gStart + " " + gEnd + "|" + theGene);
        bufferedWriter.newLine();
        System.out.println("Kenton says this is a gene: " + theGene);
      }

    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      // Close the BufferedWriter
      try {
        if (bufferedWriter != null) {
          bufferedWriter.flush();
          bufferedWriter.close();
        }
      } catch (IOException ex) {
        ex.printStackTrace();
      }
    }
  }