write errors to log on failure