:- use_module(library(iostream)). [semidet,multifile]open_hook(+Spec, 
+Mode, -Stream, -Close, +Options0, -Options)
[semidet,multifile]open_hook(+Spec, 
+Mode, -Stream, -Close, +Options0, -Options)| Close | is unified to a goal that must be 
called to undo the side-effects of the action, e.g., typically the term close(Stream) | 
| Options0 | are the options passed to open_any/5 | 
| Options | are passed to the post processing filters that may be installed by open_any/5. |