ENH: Better logging

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