changed so that if number of check chunks is greater than number of chunks in the file, the algorithm checks the entire file.