fix so that duplicate files don't get added to window