I have checked RedirectToLog, adding O_WRONLY to the flags works. I think that it is enough to continue discarding the output.