Added logging toggle to my agent