add computation of default config uri
turn generate_stats into a normal console script