Another attempt to make redirection work on Windows