main download automation script