openfile uses mktemp, checks before removes