Added much better logging output.