Wrap Callback functions if LibError is present to ensure errors are not lost