ruby interface: raise an exception if we couldn't open a file