StreamReader error While trying to read the file

I have used the stream reader in my BPM to read the file and send it as an attachment to mail but after the latest kinetic cloud upgrade it started giving the below error.
image

Below is my code which I used in my BPM.

Here is an example that works.

https://www.epiusers.help/t/lets-share-useful-functions-sharing-is-caring/100371/2?u=klincecum