Tiny comment: it would be nicer to assert that the file exists, or else throw `IOException` at least and not `Exception`. The existing instance of `Exception` above could also be changed.