Fix issue with sortOutput on Windows