title: Error 105 when creating and writing to text file
body: <p>I am testing a login and account creation program. When the user presses the Create New Account button it prompts them to enter a Username (which saves to a variable-sNewUsername) and a Password (which saves to a variable-sNewPassword). 
  The password is saved to a text file.
  For some reason, it gives me the 'I/O Error 105' when trying to save the password to the text file.</p>
  
  <p>I have run the debug tool and it saves to the variable fine but does not Write to the text file.
  I have double checked if I have used Rewrite instead of Reset and all looks fine.</p>
  
  <pre><code>AssignFile(tf,sNewUsername + '.txt');
  Rewrite(tf);
  
    writeln(sNewPassword);
  
  closefile(tf);
  </code></pre>
  
  <p>I expected the file to save the Password from the variable to the text file but it does not write the password to the text file and give an error i do not understand ('I/O error 105').</p>