[KARAF-2785] proper sorting to stdout (tests included)