TIMOB-12848: Delete temp files when they are no longer needed.  Also try to query again if the one from the intent data fails.