Cleaned up buffer(s) flush logic.

(and avoid writing empty log blocks before log dump)