A bit of exception and debugging improvements