exit on error during making zlib or cJSON