fix error message when the 'encoding' parameter to fs.writeFileSync is omitted