Working download script