Callback wrapping utility