Re-worked the wrapper code a bit to be more fail-safe, and added a
breakpoint for further debugging.