Clean up debug log. Minor bug fix in response to PUT /agents