Improve input/output handling

This expands our ability to support nested parallel by.