adding readFileSync logic