Add more logging HandleIdleShutdown() to give a clearer picture of what's happening
(cherry picked from commit be074d181b21b4107d7084d1dd6648820ed5aaed)
More robust checks before blocking shutdown for a mfdb run in the near future
(cherry picked from commit a269f9538763c426414e7dc9dd6d93d3329e2156)