Write repofile once instead of during every iteration.