Fixed cli openlog error
Fixed cli connection handling
Improve cli error handling
Added timeout -t command option