Using curl in download script