Deadlock detector saves before exiting, prepatcher uses correct logger.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>