Added logging support. Fixes #8