Fixed logging of panics