Added more error checks to zip.c