BUG archive not closed on error