add stdout output support