Add proper logging + fix core.async issue.

Apparently, core.async/put! sometimes returns nil, while the put!
succeeded and the channel is not closed. To tests whether the channel is
closed, test on false.