Works as expected with console output.