Changed some error messages. Register just for cli.