improve diagnostic printout