Fixed debug contours printing, which caused crash

At the time it is debug printed, local variable contours is empty - it's value is few lines later assigned.