use DOWNLOAD_MAXSIZE instead of DOWNLOAD_SIZELIMIT
also introduce DOWNLOAD_WARNSIZE