Added buf.toString and readFileSync feature