Index: trunk/lib/ACL.inc.php
===================================================================
--- trunk/lib/ACL.inc.php	(revision 200)
+++ trunk/lib/ACL.inc.php	(revision 201)
@@ -122,5 +122,5 @@
                 $db->query("DROP TABLE IF EXISTS aco_tbl");
                 $db->query("DROP TABLE IF EXISTS axo_tbl");
-                $app->logMsg(sprintf('Dropping and recreating tables acl_tbl, aro_tbl, aco_tbl, axo_tbl.', null), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating tables acl_tbl, aro_tbl, aco_tbl, axo_tbl.', null), LOG_INFO, __FILE__, __LINE__);
             }
             
@@ -261,5 +261,5 @@
         ");
 
-        $app->logMsg(sprintf('Added %s node %s to parent %s.', $type, $name, $parent), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Added %s node %s to parent %s.', $type, $name, $parent), LOG_INFO, __FILE__, __LINE__);
         return mysql_insert_id($db->getDBH());
     }
@@ -342,5 +342,5 @@
         $db->query("UPDATE $tbl SET rgt = rgt - ($rgt - $lft + 1) WHERE rgt > $rgt");
 
-        $app->logMsg(sprintf('Removed %s node %s along with %s children.', $type, $name, $num_deleted_nodes - 1), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Removed %s node %s along with %s children.', $type, $name, $num_deleted_nodes - 1), LOG_INFO, __FILE__, __LINE__);
         return true;
     }
@@ -464,5 +464,5 @@
         $db->query("UPDATE $tbl SET rgt = rgt + $total_transversal_value WHERE rgt >= $new_parent_rgt AND $primary_key NOT IN ('" . join("','", $ids) . "')");
 
-        $app->logMsg(sprintf('Moved %s node %s to new parent %s.', $type, $name, $new_parent), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Moved %s node %s to new parent %s.', $type, $name, $new_parent), LOG_INFO, __FILE__, __LINE__);
         return true;
     }
@@ -529,5 +529,5 @@
         
         $db->query("REPLACE INTO acl_tbl VALUES ('$aro_id', '$aco_id', '$axo_id', '$allow', NOW())");
-        $app->logMsg(sprintf('Set %s: %s -> %s -> %s.', $allow, $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Set %s: %s -> %s -> %s.', $allow, $aro, $aco, $axo), LOG_INFO, __FILE__, __LINE__);
         
         return true;
@@ -647,5 +647,5 @@
             if (!list($access) = mysql_fetch_row($qid)) {
                 $this->cache->set($cache_hash, 'deny');
-                // $app->logMsg(sprintf('Access denyed: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Access denyed: %s -> %s -> %s. No records found.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
                 return false;
             }
@@ -654,8 +654,8 @@
         
         if ('allow' == $access) {
-            // $app->logMsg(sprintf('Access granted: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Access granted: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
             return true;
         } else {
-            // $app->logMsg(sprintf('Access denyed: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Access denyed: %s -> %s -> %s.', $aro, $aco, $axo), LOG_DEBUG, __FILE__, __LINE__);
             return false;
         }
Index: trunk/lib/App.inc.php
===================================================================
--- trunk/lib/App.inc.php	(revision 200)
+++ trunk/lib/App.inc.php	(revision 201)
@@ -345,5 +345,5 @@
         }
         $this->timer->stop('_app');
-        $this->logMsg(sprintf('Script ended gracefully. Execution time: %s. Number of db queries: %s.', $this->timer->getTime('_app'), $num_queries), LOG_DEBUG, __FILE__, __LINE__);
+        $this->logMsg(sprintf('Script ended gracefully. Execution time: %s. Number of db queries: %s.', $this->timer->getTime('_app'), $num_queries), LOG_INFO, __FILE__, __LINE__);
     }
 
Index: trunk/lib/Auth_SQL.inc.php
===================================================================
--- trunk/lib/Auth_SQL.inc.php	(revision 200)
+++ trunk/lib/Auth_SQL.inc.php	(revision 201)
@@ -135,5 +135,5 @@
             if ($recreate_db) {
                 $db->query("DROP TABLE IF EXISTS " . $this->getParam('db_table'));
-                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_INFO, __FILE__, __LINE__);
             }
 
@@ -192,5 +192,5 @@
                 if ($recreate_db) {
                     $db->query("DROP TABLE IF EXISTS " . $this->getParam('db_login_table'));
-                    $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_login_table')), LOG_DEBUG, __FILE__, __LINE__);
+                    $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_login_table')), LOG_INFO, __FILE__, __LINE__);
                 }
                 $db->query("CREATE TABLE IF NOT EXISTS " . $this->getParam('db_login_table') . " (
Index: trunk/lib/Cache.inc.php
===================================================================
--- trunk/lib/Cache.inc.php	(revision 200)
+++ trunk/lib/Cache.inc.php	(revision 201)
@@ -52,5 +52,5 @@
 
         if (true !== $app->getParam('enable_session')) {
-            $app->logMsg('Cache disabled, enable_session is false.', LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg('Cache disabled, enable_session is false.', LOG_INFO, __FILE__, __LINE__);
             $this->setParam(array('enabled' => false));
         }
Index: trunk/lib/DBSessionHandler.inc.php
===================================================================
--- trunk/lib/DBSessionHandler.inc.php	(revision 200)
+++ trunk/lib/DBSessionHandler.inc.php	(revision 201)
@@ -81,5 +81,5 @@
             if ($recreate_db) {
                 $this->db->query("DROP TABLE IF EXISTS " . $this->db->escapeString($this->_params['db_table']));
-                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->_params['db_table']), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->_params['db_table']), LOG_INFO, __FILE__, __LINE__);
             }
             $this->db->query("CREATE TABLE IF NOT EXISTS " . $this->db->escapeString($this->_params['db_table']) . " (
Index: trunk/lib/Email.inc.php
===================================================================
--- trunk/lib/Email.inc.php	(revision 200)
+++ trunk/lib/Email.inc.php	(revision 201)
@@ -294,5 +294,5 @@
         // Ensure message was successfully accepted for delivery.
         if (mail($final_to, $this->_params['subject'], $final_body, $final_headers, $envelope_sender_header)) {
-            $app->logMsg(sprintf('Email successfully sent to %s', $final_to), LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg(sprintf('Email successfully sent to %s', $final_to), LOG_INFO, __FILE__, __LINE__);
             return true;
         } else {
Index: trunk/lib/Hierarchy.inc.php
===================================================================
--- trunk/lib/Hierarchy.inc.php	(revision 200)
+++ trunk/lib/Hierarchy.inc.php	(revision 201)
@@ -210,5 +210,5 @@
                 )
             ");
-            $app->logMsg(sprintf('insertNode: Added node %s %s with parent %s %s.', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_DEBUG, __FILE__, __LINE__);
+            $app->logMsg(sprintf('insertNode: Added node %s %s with parent %s %s.', $child_type, $child_id, $parent['node_type'], $parent['node_id']), LOG_INFO, __FILE__, __LINE__);
         }
         return true;
@@ -256,5 +256,5 @@
             AND child_id = '" . $db->escapeString($child_id) . "'
         ");
-        $app->logMsg(sprintf('deleteNode: Deleted node %s %s.', $child_type, $child_id), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('deleteNode: Deleted node %s %s.', $child_type, $child_id), LOG_INFO, __FILE__, __LINE__);
 
         return true;
@@ -336,5 +336,5 @@
             AND relationship_type " . (is_null($relationship_type) ? "IS NULL" : "= '" . $db->escapeString($relationship_type) . "'") . "
         ");
-        $app->logMsg(sprintf('moveNode: Deleted node %s %s.', $child_type, $child_id), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('moveNode: Deleted node %s %s.', $child_type, $child_id), LOG_INFO, __FILE__, __LINE__);
 
         // Insert new nodes with the new parents.
Index: trunk/lib/ImageThumb.inc.php
===================================================================
--- trunk/lib/ImageThumb.inc.php	(revision 200)
+++ trunk/lib/ImageThumb.inc.php	(revision 201)
@@ -367,5 +367,5 @@
                 $file_size = filesize($dest_file);
                 if (false !== $file_size && $file_size < $spec['keep_filesize']) {
-                    $app->logMsg(sprintf('Skipping thumbnail %s. File already exists and file size is less than %s bytes.', $spec['dest_dir'] . '/' . $file_name, $spec['keep_filesize']), LOG_DEBUG, __FILE__, __LINE__);
+                    $app->logMsg(sprintf('Skipping thumbnail %s. File already exists and file size is less than %s bytes.', $spec['dest_dir'] . '/' . $file_name, $spec['keep_filesize']), LOG_INFO, __FILE__, __LINE__);
                     continue;
                 }
@@ -376,5 +376,5 @@
             if ($image_size['0'] <= $spec['width'] && $image_size['1'] <= $spec['height'] && !$spec['allow_upscaling']) {
                 $spec['scaling_type'] = IMAGETHUMB_NO_SCALE;
-                $app->logMsg(sprintf('Image %s smaller than specified %s thumbnail size. Keeping original size.', $file_name, basename($spec['dest_dir'])), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Image %s smaller than specified %s thumbnail size. Keeping original size.', $file_name, basename($spec['dest_dir'])), LOG_INFO, __FILE__, __LINE__);
             }
 
@@ -382,9 +382,9 @@
             if (IMAGETHUMB_METHOD_NETPBM === $this->getParam('resize_method') && file_exists($this->getParam('anytopnm_binary')) && file_exists($this->getParam('pnmscale_binary')) && file_exists($this->getParam('cjpeg_binary'))) {
                 // Resize using Netpbm binaries.
-                // $app->logMsg(sprintf('Resizing with Netpbm: %s', $source_file), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Resizing with Netpbm: %s', $source_file), LOG_DEBUG, __FILE__, __LINE__);
                 $return_val += $this->_resizeWithNetpbm($source_file, $dest_file, $spec);
             } else if (IMAGETHUMB_METHOD_GD === $this->getParam('resize_method') && extension_loaded('gd')) {
                 // Resize with GD.
-                // $app->logMsg(sprintf('Resizing with GD: %s', $source_file), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Resizing with GD: %s', $source_file), LOG_DEBUG, __FILE__, __LINE__);
                 $return_val += $this->_resizeWithGD($source_file, $dest_file, $spec);
             } else {
@@ -637,5 +637,5 @@
             }
         }
-        $app->logMsg(sprintf('THumbnails successfully deleted for file: %s', $file_name), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('THumbnails successfully deleted for file: %s', $file_name), LOG_INFO, __FILE__, __LINE__);
         return 0 === $return_val;
     }
@@ -658,11 +658,18 @@
         }
 
+        // Ensure we have a source.
+        if ('' == $file_name) {
+            $app->logMsg(sprintf('Cannot delete, filename empty.'), LOG_WARNING, __FILE__, __LINE__);
+            return false;
+        }
+
         $source_file = realpath(sprintf('%s/%s', $this->getParam('source_dir'), $file_name));
-        if (!unlink($source_file)) {
+        if (is_file($source_file) && unlink($source_file)) {
+            $app->logMsg(sprintf('Original file successfully deleted: %s', $file_name), LOG_INFO, __FILE__, __LINE__);
+            return true;
+        } else {
             $app->logMsg(sprintf('Delete original failed: %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
             return false;
         }
-        $app->logMsg(sprintf('Original file successfully deleted: %s', $file_name), LOG_DEBUG, __FILE__, __LINE__);
-        return true;
     }
 
Index: trunk/lib/Lock.inc.php
===================================================================
--- trunk/lib/Lock.inc.php	(revision 200)
+++ trunk/lib/Lock.inc.php	(revision 201)
@@ -84,5 +84,5 @@
             if ($recreate_db) {
                 $db->query("DROP TABLE IF EXISTS " . $this->getParam('db_table'));
-                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_INFO, __FILE__, __LINE__);
             }
             $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " (
Index: trunk/lib/MCVE.inc.php
===================================================================
--- trunk/lib/MCVE.inc.php	(revision 200)
+++ trunk/lib/MCVE.inc.php	(revision 201)
@@ -161,5 +161,5 @@
                 mcve_text_avs(MCVE_TransactionAVS($this->conn, $tid)),
                 mcve_text_cv(MCVE_TransactionCV($this->conn, $tid))
-            ), LOG_DEBUG, __FILE__, __LINE__);
+            ), LOG_INFO, __FILE__, __LINE__);
             return true;
         } else {
Index: trunk/lib/Prefs.inc.php
===================================================================
--- trunk/lib/Prefs.inc.php	(revision 200)
+++ trunk/lib/Prefs.inc.php	(revision 201)
@@ -93,5 +93,5 @@
             if ($recreate_db) {
                 $db->query("DROP TABLE IF EXISTS " . $this->getParam('db_table'));
-                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_INFO, __FILE__, __LINE__);
             }
             $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " (
Index: trunk/lib/Utilities.inc.php
===================================================================
--- trunk/lib/Utilities.inc.php	(revision 200)
+++ trunk/lib/Utilities.inc.php	(revision 201)
@@ -250,5 +250,5 @@
  * @version     1.1.0
  */
-function humanFileSize($size, $max_unit=null, $format='%01.2f %s')
+function humanFileSize($size, $format='%01.2f %s', $max_unit=null)
 {
     // Units
@@ -653,5 +653,5 @@
     
     if ('' == trim($val)) {
-        $app->logMsg(sprintf('Cannot add signature to an empty string.', null), LOG_DEBUG, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Cannot add signature to an empty string.', null), LOG_INFO, __FILE__, __LINE__);
         return '';
     }
Index: trunk/lib/Version.inc.php
===================================================================
--- trunk/lib/Version.inc.php	(revision 200)
+++ trunk/lib/Version.inc.php	(revision 201)
@@ -90,5 +90,5 @@
             if ($recreate_db) {
                 $db->query("DROP TABLE IF EXISTS " . $this->getParam('db_table'));
-                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_DEBUG, __FILE__, __LINE__);
+                $app->logMsg(sprintf('Dropping and recreating table %s.', $this->getParam('db_table')), LOG_INFO, __FILE__, __LINE__);
             }
             $db->query("CREATE TABLE IF NOT EXISTS " . $db->escapeString($this->getParam('db_table')) . " (
