Fixed startup/restart/shutdown issues on Windows, Linux, FreeBSD platforms tested.

Fixed for updating issues.

Fixed high cpu and memory usage.