Fix potential data loss if cleaning old files fails