Adding output code to allow sanity checking of correct runs