Fix res.sendFile logging standard write errors

closes #2451