Fix res.sendFile logging standard write errors

fixes #2433