Added feature to track errors and log errors

Error messages are added to a private array as the archive is built. When the archive is finished, if any errors have been logged, an error log file is created at the end of the archive, containing all collected error messages.