add state saving for multiple logs