compile fix.

Adds more detailed logging (not yet used anywhere useful).