added sortandmerge_bad
print out more info