title: CSV writer also writing filename in error
body: <p>Here's the code for my CSV writer:</p>
  
  <pre><code>public void writer(String firstName, String lastName, String phone) throws IOException {
          File file = new File(date() + ".csv");
          if(file.exists() &amp;&amp; !file.isDirectory()) {
              String csv = readWholesale(date() + ".csv");
              csv += "\n" + phone + "," + firstName + "," + lastName;
              FileWriter fwriter = new FileWriter(date() + ".csv", true);
              fwriter.write(csv);
              fwriter.flush();
              fwriter.close();
          }
          else {
              FileWriter fWriter = new FileWriter(date() + ".csv");
              fWriter.write(phone + "," + firstName + "," + lastName);
          }
          return;
  </code></pre>
  
  <p>Here's the sample output in the CSV:</p>
  
  <pre><code>2020-06-12.csv
  1234567890,John,Doe2020-06-12.csv
  1234567891,Jane,Doe
  </code></pre>
  
  <p>Any ideas as to why it would be doing this? Any input would be greatly appreciated.</p>
  
  <p>EDIT: Also, here's the method readWholesale:</p>
  
  <pre><code>Scanner scan = new Scanner(path);
          String csv = "";
          while(scan.hasNextLine()) {
              csv += scan.nextLine() + "\n";
          }
          csv = csv.substring(0, csv.length() - 1);
          return csv;
  </code></pre>