Added comments to writeTDE