- Stop logger from trying to chmod on each event to safe i/o and prevent error messages popping up when the user is different then the webserver
diff --git a/system/libraries/Log.php b/system/libraries/Log.php
index 6ea905f..46c5b6e 100644
--- a/system/libraries/Log.php
+++ b/system/libraries/Log.php
@@ -111,6 +111,7 @@
 
 		if ( ! file_exists($filepath))
 		{
+			$newfile = TRUE;
 			$message .= "<"."?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?".">\n\n";
 		}
 
@@ -126,7 +127,10 @@
 		flock($fp, LOCK_UN);
 		fclose($fp);
 
-		@chmod($filepath, FILE_WRITE_MODE);
+		if (isset($newfile) AND $newfile === TRUE)
+		{
+			@chmod($filepath, FILE_WRITE_MODE);
+		}
 		return TRUE;
 	}
 
@@ -134,4 +138,4 @@
 // END Log Class
 
 /* End of file Log.php */
-/* Location: ./system/libraries/Log.php */
\ No newline at end of file
+/* Location: ./system/libraries/Log.php */