ENH: Better logging

Addresses #85. Should help debugging some of these issues. Tests illustrate use cases. Should be ready for review.