add closing to tarfile and debug statements to means.