Devin Review caught that `--out -` discarded the sample count, so
the stderr summary always said 'wrote 0 sample(s)' even when bytes
were streamed. Capture the return value like the file-output branch
does, and add a regression test that exercises the stdout path.
Co-Authored-By: adrian kuman firmansah <adriancuman@gmail.com>