If exception occurs make sure we still delete the temp file.
and check response of tiixml correctly