testgen: improved output format