Cleanup exception handling