Cleanup logging flag for agent