tweak to checking GetState errors in old method
Now records trials, Trw to log file when verg is closed.