$log->add_log($sessionID, 'Warning', 'CheckThresholds Warning: Debug Option missing or invalid.');
 } else {
     if ($opt_debugLog == 'False') {
         $log->opt_debug = false;
     } else {
         $log->opt_debug = true;
     }
 }
 $opt_logLoc = $sql->getOption('Log_File_Location');
 if ($opt_logLoc === false) {
     $log->add_log($sessionID, 'Warning', 'CheckThresholds Warning: Log_File_Location Option missing or invalid.');
 } else {
     $log->set_log_location($opt_logLoc);
 }
 $runLevel = $sql->verifySID($sessionID, "1");
 $arr = $sql->gatherSQLCredentials();
 $query = array("USE master", "ALTER DATABASE IMS SET SINGLE_USER WITH ROLLBACK IMMEDIATE", "RESTORE DATABASE IMS FROM DISK = N" . $arr["location"], "ALTER DATABASE IMS SET MULTI_USER");
 $conn = sqlsrv_connect($arr["servername"], array('UID' => $arr["username"], 'PWD' => $arr["password"], 'Database' => $arr["db"], 'CharacterSet' => 'UTF-8'));
 if (!$conn) {
     print_r(sqlsrv_errors());
     exit;
 }
 sqlsrv_configure("WarningsReturnAsErrors", 0);
 foreach ($query as $current) {
     if ($stmt = sqlsrv_query($conn, $current)) {
         do {
             echo "\n";
             if (($errors = sqlsrv_errors()) != null) {
                 foreach ($errors as $error) {
                     //echo ("SQLSTATE: ".$error[ 'SQLSTATE']."\n");
                     $dataArray .= "SQLSTATE: " . $error['SQLSTATE'] . "\n";