Use range header only if required. Debug improved for S3 downloads.