fix edge condition in blksz calculation at EOF and output formatting tweak