fix bug where len of binary category map was always 0
add some logging messages