Save statistics about the raava processes (review only!)

how `self._state_writer` could be `None`?