Files are getting deleted from the SD card
<p>I have developed a Service which will start when I receive the "ON_BOOTUP_COMPLETED" intent,</p>

<p>in "onCreate" of my Service I wrote the logic to create a text file in SD card of the device.</p>

<p>Below is the logic I have used to do so:</p>

<pre><code>       File abc = new File(Environment.getExternalStorageDirectory()+"\abc.txt");
        if(!abc .exists())
            abc.createNewFile();
        abcwriter = new FileWriter(abc);
</code></pre>

<p>I am using "abcwriter" in other methods to write some content in to text file.
So far it is working fine.</p>

<p>But when rebooted the device, I observed that "abc.txt" file is creating again.</p>

<p>but I put a check before creating file "if(!abc .exists())".  But still new file is created.</p>

<p>I suspect that when I rebooted the device my files are deleted. Is this the android behaviour..??</p>

<p>If it is please help me what I can do to make sure my files not created again. </p>
