Added sleep when something fails.