how to safely open files downloaded with tor?

If I download a file (PDF,doc,image,video etc) with a tails/tor setup, how can I ensure the file doesn’t "call home" or isnt imbedded with malware (other than looking at the hash)? Will a simple malware scan work? And if I use tails to open the files and disconnect from the network I’m using can I still have my anonymity compromised?