cleaner handling of temp file downloaded via http