added debug logger