Fixed error with bad calls of readFile