That's a good one. There are two problems here, one with vi and the other with mkstemp(); both are relatively easy to fix. - todd