Add missing unlock and write files.