More informative error message on IOError.