error on test  refresh_log before assignement

added definition before test