check existence of stats table earlier