Writing logs on file on external sdcard on android devices

view story

http://stackoverflow.com – I have an application where I write logs on a file located on the external memory card. This application runs on a lot of same devices, samsung galaxy S2, and when a user reports a problem we retrieve the logs through an mdm system in order to understand the cause. Every thing works really fine, but sometimes we find that there are "holes" in the log (we see the web services calls in a specific range of time but there are no logs on the file).The code I use to write the code is the following, and I really don't understand how can it be possibile FileWriter filewriter = null; try (HowTos)