More useful debug messages on exceptions