Simple logging mechanism for recording unhandled exceptions