create history.db if not exists \ correct save one state