As seen totalBytes is showing negative numbers first 5 loops, then only - zero.. This is totally wrong. Should start from 0 and add (number of blocks) * blocksize to itself at each loop.. Why do esnt it do that????