Add debug output for exception