fix(fileManager): Fix add a new file (closes #4513)

Preserve index of external modification