Added the logger functionality
Fixes #20