Redirection was not working - WriteFile needs number of bytes, not chars