If we open file for write, we create a new file and close it. Therefore we have existing path for GetShortPathName. Strangely zlib fails on gzclose if file descriptors are used.