add stdout capture