add error handling for bad tar archive