added custom logging