Clean up the loop to sleep and check again.