Adapt error displaying to cli environment