fixed endif condition mismatch in cpacktools module