changes stdout and stderr to Logger messages