clean up diagnostic output