Wait for stdout to drain before exiting.
wrote examples in terms of real files in the project
use in-project example per mcandre's pull request