add change directory feature. Add param to dowanload and connect function