Proper multi handle cleanup.
Add some debug outputs.