log sleep, and correctly set limit