latest changes to give more detailed output at end of script