Added check for characters in file name