rename files and add validation code