private bool IsValidFileName() { bool valid = false; //must check this first, as trying to use Path.Combine with an illegal file char will throw an argument exception if (OsirtHelper.IsValidFilename(FileName)) { string path = Path.Combine(Constants.ContainerLocation, Constants.Directories.GetSpecifiedCaseDirectory(action), FileName + FileExtension); if (!File.Exists(path)) { valid = true; } } return(valid); }