Refactor the path routines to find if an upgrade is available.
Make the monitoring.c code output errors to the log file
Refactor the upgrade code to tell if one is available and upgrade the files on windows.