DBUS-156: close other streams even if it is failed to close one of the stream
throw an exception if it is not able to close the outputstream
Should throw an exception when it is not able to write to the file (i.e. file may have partial data)
merge develop branch into this and fix merge conflicts
Merge pull request #6 from rajubairishetti/DBUS-156

Dbus 156: Should close all the streams/files even if it is failed to close one of the streams/files