removed blocking while loop in bad interrupt catch function.
Useful for debugging, but better left out for production builds