checking for rate limit status and sleeping