Added logging feature.