change readFile to async