more logging to flood logs, and fix a buf-leak