Added logging and debugging functions to the install script