Added basic logging - will do more and add a pull request later.