diff --git a/modules/statistics/lib/Aggregator.php b/modules/statistics/lib/Aggregator.php
index 2fe726ebef14a1da090939a266bb889e8c21b405..423a33ad2c2c26f9813345919d6a859024da3aaf 100644
--- a/modules/statistics/lib/Aggregator.php
+++ b/modules/statistics/lib/Aggregator.php
@@ -77,7 +77,9 @@ class sspmod_statistics_Aggregator {
 			throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']');
 		
 		$file = fopen($this->inputfile, 'r');
-		#$logfile = file($this->inputfile, FILE_IGNORE_NEW_LINES );
+
+		if ($file === FALSE)
+			throw new Exception('Statistics module: unable to open file [' . $this->inputfile . ']');
 		
 		$logparser = new sspmod_statistics_LogParser(
 			$this->statconfig->getValue('datestart', 0), $this->statconfig->getValue('datelength', 15), $this->statconfig->getValue('offsetspan', 44)