Archive lock

Shouldn't we check for errors before inserting?