FIXED: missing base clause.  Wouter Beek.
FIXED: Determinism in open_input/4 (Wouter Beek)