using promises to download files