Added custom logging