fixed adding the same file multiple times