Sorting functions for byte frequencies and additional printed outputs in key determination