Change architecture of test prog to support different output types