Improve debug logging in ReadLoop