Add debug log
This library doesn't have any logging facilities which makes it small and clean, but it also makes it more difficult to follow and find bugs.
We might want to be consisten with our other libraries and add a debug log so that it becomes easier to follow when there's issues.