Moved download to separate file for scheduling