closing temp file before unlinking for windows compatibility