private void writeFile(String protein, String name, URI file)
   {
      File f = new File(file);
      try
      {
         FileWriter fw = new FileWriter(f);
         try
         {
            fw.write(protein);
         }
         catch(IOException i)
         {
            throw new RuntimeException("Error writing to file.");
         }
         finally
         {
            try
            {
               fw.close();
            }
            catch(IOException close)
            {
               throw new RuntimeException("Error writing to file.");
            }
         }
      }
      catch(IOException ioe)
      {
         throw new RuntimeException("Could not write protein to file.");
      }
      
      if(!name.equals("test"))
         {
         try
         {
            FileWriter fr = new FileWriter(new File(PROTEIN_LIST_URI), true);
            try
            {
               fr.write(name + EXTENSION + DELIMITER);
            }
            catch(IOException write)
            {
               throw new RuntimeException("Error appending protein to list.");
            }
            finally
            {
               try
               {
                  fr.close();
               }
               catch(IOException close)
               {
                  throw new RuntimeException("Error appending protein to list.");
               }
            }
         }
         catch(IOException io)
         {
            throw new RuntimeException("Could not write protein to protein list file.");
         }
      }
   }