Better control of the IO manager thread; improvements to deadlock checking