Fixed error in calling readFileSync