Make sure log_msg() sends messages to STDERR until the context gets initialized.

It should fix the default behavior of log_msg().