bug fix & logging
Merge pull request #10 from tobiasandersson/master

bug fix & logging