added optional identity check, saves normalized SDFile, adds informative headers to diagnostic text files