Fixed logging behaviour in CLI