Improved download artifacts logic