DNN-3623 - handled empty files, and files of large size