Problem in shutting down my Mac
I encountered a problem as the attached shows. It's unclear which app prevented my mac shutting dow. I tried to (force) quite all running applications, but doesn't work. I used disk utility to check the disk, and it says safe.
"Your Mac hasn't shut down because an app failed to quit. To try to continue shutting down again, click try again. --To quit an unresponsive app, select Force Quit from the Apple Menu (or press Command-Option-Esc).
I also tried to boot my Mac in recovery mode, and reinstalled MacOS Sierra, but the problem is still there. This problem usually comes when I use the computer for a long time (usually more than 6 hours), and it appears when I tried to shut down or restart the machine. If I shut down/reboot the computer using command mode in terminal, this will not happen.
Another problem is that the dark dot indicating the app is running under the app icon on dock may also disappear in some unclear cases, especially when the above issue happens, but I think the above mentioned is the main problem.