Fixing upgrading readFile to match new API