Fix random sleep: Logical error in if statement
Add logging for random sleeping