Remove warning and improve sample output

This removes an "unused variable" warning and uses that variable to output more sample information.