update maxDownload.py script

add consideration for success code