added logger closure