Fix wrong checksum calculation for files > 8 kB