Fixed bug in file stream that prevented some files from being read
correctly.