implemented file add (does not work for drag-and-drop)