VOYEUR: Minor fix to getNextRecord and added a few debug lines