use the right log_msg() instead of debug()