Throw an IOError if we can not file the file