public void writeToFile(int file, String textLine, String t) throws IOException
{
    String path;
    if(t.equalsIgnoreCase("acc"))
    {path = accDir+file+".txt";}
    else
    { path = appDir+file+".txt";}
    
       boolean append_to_file = true;
  FileWriter write = new FileWriter(path, append_to_file);
  PrintWriter print_line = new PrintWriter(write);
  print_line.printf("%s%n", new Object[] { textLine });
  
  print_line.close();
    }