Close output stream in FileUtils and catch errors in downloading files
Merge pull request #899 from heidiso/release-24

Catch errors in downloading files / Close streams in FileUtils