public void flushToFile() {
    if (txFileOutputStream != null) {
      try {
        txFileOutputStream.flush();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    if (stFileOutputStream != null) {
      try {
        stFileOutputStream.flush();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
    if (qFileOutputStream != null) {
      try {
        qFileOutputStream.flush();
      } catch (IOException e) {
        e.printStackTrace();
      }
    }
  }