[PS Download Code] Used an array to repeat download commands

added handling on https protocol not found