Always close files in case of exceptions upon creation.

If the user of the library gets an exception before he
can get the actual object he will be unable to manually
close it. Therefore the library will now close it instead.
+1 use try-with-resources.