improved exception handling output