redirect (and append) stdout and stderr to file and terminal