Added regex to validate file names.