updated debug logging