fix the case with a file of maximum possible size