Adding support for Z preservation in download process