For saving the test logs you typically use a test runner. When you check if an element is on the page and you can’t find it then you raise an exception (typically an assertion error) and the test runner will record this and mark it as a failed test. In the documentation they suggest you use Mocha.
As for saving a screenshot to disk, the the api looks like this
driver.takeScreenshot().then(
function(image, err) {
require('fs').writeFile('out.png', image, 'base64', function(err) {
console.log(err);
});
}
);