Add logging

Indeed, I am assuming single-threaded operation (coroutines don't count).