added some logger code