added logger fn