Patch sleep in tests
Add more debugging logging messages