Better comments
Easier to track where errors are being unset this way
Accommodate an empty array of errors
Stream the data to the file, instead of writing it all at once, to avoid issues with large files

See https://github.com/humanmade/WP-Remote-WordPress-Plugin/pull/81#discussion_r7144333