put stat saving in bg thread