Wait for database update to finish when adding files