Close before unlink because windows