Fix git clone failure detection