If the fileerrors flag is set to off, the built-in predicates that open files simply fail, instead of raising an exception if the specified file cannot be opened.
fileerrors
off