diff --git a/app/src/main/java/org/apache/fineract/utils/FileUtils.java b/app/src/main/java/org/apache/fineract/utils/FileUtils.java index 57f841fe..06095496 100644 --- a/app/src/main/java/org/apache/fineract/utils/FileUtils.java +++ b/app/src/main/java/org/apache/fineract/utils/FileUtils.java @@ -221,10 +221,11 @@ public static void writeInputStreamDataToFile(InputStream in, File file) { while ((len = in.read(buf)) > 0) { out.write(buf, 0, len); } - out.close(); - in.close(); } catch (Exception e) { Log.d(LOG_TAG, e.getLocalizedMessage()); + } finally { + out.close(); + in.close(); } }