Adding some more logging to the system shutdown routine