Fixed bug large files not being read properly