heartthreader: move printing outside of digest function