download and save files
various debug code
use binary I/O for zip files