while read -r url filename; do
if wget --cut-dirs=100 -np -e robots=off -O $outdir$filename $otherargs $url; then
while read -r url filename; do
if wget --cut-dirs=100 -np -e robots=off -O $outdir$filename $otherargs $url; then
logger -s -t $LOGTAG "downloaded $filename"
else
logger -s -t $LOGTAG "downloading of $filename from $url failed."
logger -s -t $LOGTAG "downloaded $filename"
else
logger -s -t $LOGTAG "downloading of $filename from $url failed."