Adding logging

Fixed #8