zip: add sanity checks