full renew function with error message handling