windows needs an explicit close before unlink