add stdout/stderr capturing