Fixed unicode error during stdout redirect.