correctly close and unlink dna temp file when finished with it