remove metadata even if writeFits fails (try/finally)
move eups_versions code to separate class.