Removed some debug code. Added 100ms sleep between getpos