Change error handling from info! to sending quit-package to server because if there is an error on stdout client will not be able to interact with server anymore. So client program must be closed.
let e = stdout().flush();
match e {
Ok(_) => {},
Err(_) => info!("")
}