moving addFile call