faster workaround for windows file write race condition