To my knowledge, $read will only work well with text files. It may or may not work with other file types, and the results probably wouldn't be all that useful.
I'd suggest using $fread instead. You may have the same issues, but you'd have an easier time cutting the excess data that a non-text file will have.