Use predicate-based redefinition of I/O