add docs for flush_at_shutdown