respect repo structure when saving files