genkey: slight refactoring (nicer print)