append stdout and stderr to file