Cleanup: use stack-allocated FileDialog and accept multiple KDMs.