Propagate exit code from server, use it in cli