bringing add file tool up to date with new changes