Fixed readFile bug