Hashing before starting download

Downloaded pieces are not downloaded again
Fixed a small bug in DiskIO in Read()