I am using readFileSync() to read a file and get it as a buffer.
let buffer = fs.readFileSync(path);
But,