[ fix ] make the redirected output ready to copy