Added DOWNLOAD_DIR check to see if it's a directory