updating thread persistence to leveldb