improve rebuild failure catch