move log setup back to agent