title: Text file in Java is not created
body: <p>I'm writing a program in Java (version lower than 7) that will be executed over a linux machine.</p>
  <p>The code is the following, it keeps asking for a file in a directory, and when it is created then an answer file is also created in the same directory:</p>
  <pre><code>File file;
  String filePath = &quot;/mnt/fs_services/pid/data/users/sup/test.txt&quot;;
  
  do {
      file = new File(filePath);
  } while(!file.exists());
  
  File fileAnswer = new File(&quot;/mnt/fs_services/pid/data/users/sup/answer.txt&quot;);
  try{
      fileAnswer.createNewFile();
  } catch (IOException e1) {
      e1.printStackTrace();
  }
  </code></pre>
  <p>The code is executed and the reply file is not created when I create the test.txt. Also it doesn't seem to throw an error in any moment, so I don't know what can happen. Any idea about what is happening?</p>
  <p>Thank you so much.</p>