Added option to set logger