result of readFileSync is a buffer if encoding is not specified, so no need to put that in a buffer. thanks to mbras for noting this