Added logging capability.