move logging to fix name error.