Commit revised fix for log warning messages.

It seems likely that the original fix was ok, but there were some debugging warning messages left in that were causing trouble.
Merge pull request #28 from mgage/master

Reapply a corrected version of the fix