make sync gateway config upload more robust