Added logging - closes #167