faster read/write to state file