use curl --remote-name-all instead of while read curl