fix all names and numbers to remove duplicates
added if statement to check if file upload or file save