instead of asserting things that look like IOError, actually raise the proper IOError exception