stat_persistor: corrections in error handling