I was using File.ReadAllText(file) instead of File.ReadAllBytes(file) to read the content of the file. Using readallbytes works and it’s the proper way.