Remove illegal characters in the file id