fix test cases
save index as file in repository