Added a delay to retries even in error cases. #4.