stats, better logging