Log buffering

Add buffering into the log consolidation code. When there are concurrent writes present, force writes through the log consolidation code.