Edited script so that workflow does not blow up when it reads a unicode file