added cli preferences and DomainError. Raises Error when the user tries to use inappropriate settings. The error is captured and the client is shut down.