change file copy to file rename, after finishing upload