MANTA-58 debug logging improvements
MANTA-58 fix off-by-one in scanEnd, assert conditions