Check if log_cb is not null for preserving backwards compatibility