accept a lambda to produce output redirection config/string
Merge pull request #362 from xli/master

accept a lambda to produce output redirection config/string