Put debug statement in check prime also prints each final item on a newline