On his return journey, begun on 29 July, he took a route more to the south than that originally followed, keeping close to the Niger River as far as Bamako, thus tracing its course for some 300 miles .