use with tm.ensure_clean_path here to auto delete the file (should be around the this entire operation )