more debug
archive a cleaned up version
error handling
fix deduplication