Index: trunk/MagicSoft/Mars/msimcamera/MSimBundlePhotons.cc
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimBundlePhotons.cc	(revision 9413)
+++ trunk/MagicSoft/Mars/msimcamera/MSimBundlePhotons.cc	(revision 9422)
@@ -106,5 +106,8 @@
     // Make sure that each line has exactly one row
     if (!fLut.HasConstantLength() && fLut.GetMaxEntries()!=1)
-        return kFALSE;
+    {
+        *fLog << err << fFileName << " wrongly formatted." << endl;
+        return kFALSE;
+    }
 
     *fLog << inf << "Using look-up table from " << fFileName << endl;
Index: trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc
===================================================================
--- trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc	(revision 9413)
+++ trunk/MagicSoft/Mars/msimcamera/MSimReadout.cc	(revision 9422)
@@ -163,12 +163,11 @@
     }
 
-    // Get Number of pixels
-    const UInt_t npix = fData->GetNumPixels();
-
-    if (npix!=fCamera->GetNumChannels())
+    // Make sure that we have not more analog channels than pixels
+    // FIXME: Is this really necessary?
+    if (fCamera->GetNumChannels()>fData->GetNumPixels())
     {
         *fLog << err;
         *fLog << "ERROR - Number of analog channels " << fCamera->GetNumChannels();
-        *fLog << " doesn't match number of pixels " << fData->GetNumPixels() << endl;
+        *fLog << " exceeds number of pixels " << fData->GetNumPixels() << endl;
         return kERROR;
     }
@@ -221,8 +220,8 @@
 
     // Digitize into a buffer
-    MArrayI buffer(nslices*npix);
+    MArrayI buffer(nslices*fData->GetNumPixels());
 
     // Loop over all channels/pixels
-    for (UInt_t i=0; i<npix; i++)
+    for (UInt_t i=0; i<fCamera->GetNumChannels(); i++)
     {
         // Get i-th canalog hannel
