not able to write to an already existing file using file writer from catch block
<p>I have created a log file using file writer and is written on a separate method.
Now my aim is to call this method from a catch block.</p>

<p>I have made SOP from catch block and its fine but logs  are not written in to file.</p>

<p>//Code is as below:</p>

<p>Create file </p>

<pre><code>fstream = new FileWriter(strdate.toString()+".txt",true); 
out = new BufferedWriter(fstream); 
out.write("hello world");
</code></pre>

<p>Now i am calling <code>out.write</code> from a catch block as below </p>

<pre><code>catch (IOException e) { 
    out.write("this is rest of my string"); 
}
</code></pre>

<p>Thanks in advance</p>
