added output option to client main