title: Cannot Write String to FileWriter/BufferedWriter
body: <p>I am trying to make an application that will create Google Authenticator secret keys, as well as authenticate the OTP. I am writing all of my passwords to individual files titled with the name that goes along with them.</p>
  
  <p>First and foremost, I am using this library.
  <a href="https://github.com/aerogear/aerogear-otp-java" rel="nofollow">https://github.com/aerogear/aerogear-otp-java</a></p>
  
  <p>This is my code:</p>
  
  <pre><code>public void createUserFile(String name) throws IOException
  {
      File file = new File("users\\" + name + ".txt");
      file.createNewFile();
  }
  
  public void generateUserKey(String name)
  {
      try 
      {
          File file = new File("users\\" + name + ".txt");
          FileWriter fw = new FileWriter(file);
          BufferedWriter out = new BufferedWriter(fw);
          String s = Base32.random();
          out.write(s);
          out.close();
      } 
      catch (IOException e) 
      {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>If I change the value of <code>s</code> to something like "Hello" I am fine. However, it will not write that random string. That is what I need help with. I have tinkered and searched hours for answers, and I have found nothing.</p>