add a file and the existed file adding new method