Replaced redundant code by wrapping
Fixed possible NullPointerException when throwing other exceptions
Files will now always reset if the size is supplied
Compacted code
Added method for saving