add file upload function and add dup file check