added retry mechanism for network timeouts