save before managing the repositories