Your code works fine for me. Are you sure that test.zip.004
is actually a valid zip file?
If you are running on Linux, or have access to the commandline unzip
command, try testing that the file is valid.
# Check that it is valid
$ unzip -t test.zip.004
Archive: test.zip.004
testing: abc OK
No errors detected in compressed data of test.zip.004.
# Corrupt the zip file
$ echo xxx >test.zip.004
# unzip spots the corruption
$ unzip -t test.zip.004
Archive: test.zip.004
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of test.zip.004 or
test.zip.004.zip, and cannot find test.zip.004.ZIP, period.