Added logging capability