Ensure that the file name are always valid