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