fix(log): truncate file and reset offset correctly

coreos/etcd#829