Also I don't like the pause 200 inside the loop. Are you sure you are not missing any events there?

Ioannis