add lib type debug output, update #2305