Reduced lock time when iterating the file list