pay attention that the usleep is in micro seconds, may be it is better 20000 (20 milliseconds) than 20 microseconds.