I have tested the minimum time pause at my computer is around 50ms. I have changed the pause to twice of this value(100ms) in order for it to work reliably.