This is because the system is not able to find the file. and the reason could be youare trying to access the file before it is created. Thus the application works when your file is present and otherwise throws an exception. Fastest way (not the best) to slove ths is Handle the exception, you can do that by putting code (where you try to open the file) in a try catch block, and ask te usr to retry. I hope that helps. Regards,