changed how the binary file was being read instead of using char buffer