added persistent stats in case of crash
removed console logs.