support capture of standard error and standard output

support capture of standard error and standard output