The close and unlink would be safer in a finally block?
The name is 'wtest' I would add a random part just in case one had some wtest leftover...