Adds a check for error coming from readFile

I think the desired behaviour is to bail if we get a missing file. A partial listing would only lead to harder bugs to track down later.