set stdout and stderr