I took it to an Apple retail store Genius Bar. They very quickly discovered it was remnants of anti-virus program Kaspersky causing the machine to hangup on Shutdown or Restart. Months ago, I installed a trial version of Kaspersky and decided not to use it. Instead of using the Kaspersky Uninstaller I just dragged it from Applications to Trash. The Apple tech downloaded the trial again and then used the Uninstaller to remove it. Issue solved. Lesson learned. Check to see if an app has an Uninstaller and use it rather than just dragging to the Trash.