improved error handling in cause of catastrophic errors