added loggable version of make_safe_callback