fix stderr output issue