Windows: Redirect output even if the process finished soon