change readFileSync to readFile method