fix race conditions occurring in previous implementation for log streaming output that
occasionally resulted in no output.  all in all, result is predicable logging.