namespace the log_stream_*() functions and improve errormsg