Use a new exception class to propagate errors, instead of IOException (which is too non-specific, and doesn't retain causes).