changed method "readFile"