change to use file() in readAs()