Added some logging for debugging. Paired by Michael and Richard.

(Feature #143)