Create _display_output function for stdout.