simplified output redirection

Replaced `logging_file` argument with `stream`
stream accepts a string of a file's full path, or an object that
implements `write` and `flush`