Small off-by-one error and more debugging output.
Remove HTML breakline because this debugging is console only.