Added onStdout and onStderr callbacks