allow drag-drop opening of files
allow dropping directories as well
fix directory duplication
use forEach instead