diff --git a/TM/io.py b/TM/io.py
index 4b24e1aa1446fc246a62334f871389ea1460ce5c..e773b5e4a95ecbf9559f583d8827f993fa0bb974 100644
--- a/TM/io.py
+++ b/TM/io.py
@@ -1278,19 +1278,25 @@ def is_chunk_preloaded(chunkId, chunkTime, chunkLength, raw=True, processed=True
     basefilename =  "chunk_%d_%s_%d" % (chunkId, chunkTime.strftime("%Y-%m-%dT%H-%M-%S"), chunkLength)
     basefilename = os.path.join(config.chunkCacheDir, basefilename)
 
+    # backward comaptibility (to be removed someday)
+    backward_fname = os.path.join(config.chunkCacheDir, ("chunk_%d" % chunkId) )
+
     # 1. the original waveform data (in float32 dtype/encoding)
     if raw:
-        if not os.path.isfile(basefilename + "_raw.mseed"):
+        if not os.path.isfile(basefilename + "_raw.mseed") and \
+           not os.path.isfile(backward_fname + "_raw.mseed"):
             return False
 
     # 2. the (processed) waveform data in float32 dtype/encoding)
     if processed:
-        if not os.path.isfile(basefilename + "_proc.mseed"):
+        if not os.path.isfile(basefilename + "_proc.mseed") and \
+           not os.path.isfile(backward_fname + "_proc.mseed"):
             return False
 
     # 3. the windowed standard deviation arrays (possibly incl. masks)
     if stdwin:
-        if not os.path.isfile(basefilename + "_stdwin.dat"):
+        if not os.path.isfile(basefilename + "_stdwin.dat") and \
+           not os.path.isfile(backward_fname + "_stdwin.dat"):
             return False
 
     return True
@@ -1310,7 +1316,7 @@ def read_chunk(chunkId, raw=True, processed=True, stdwin=True):
     # 1. the original waveform data (in float32 dtype/encoding)
     if raw:
         try:
-            file_list = glob.glob(basefilename + '_*_raw.mseed')
+            file_list = glob.glob(basefilename + '_*raw.mseed')
             if len(file_list) != 1:
                 logger.error("Cannot read chunk %d, (files matching the pattern: %s)" % 
                              (chunkId, file_list))
@@ -1324,7 +1330,7 @@ def read_chunk(chunkId, raw=True, processed=True, stdwin=True):
     # 2. the (processed) waveform data (in float32 dtype/encoding)
     if processed:
         try:
-            file_list = glob.glob(basefilename + '_*_proc.mseed')
+            file_list = glob.glob(basefilename + '_*proc.mseed')
             if len(file_list) != 1:
                 logger.error("Cannot read chunk %d, (files matching the pattern: %s)" % 
                              (chunkId, file_list))
@@ -1338,7 +1344,7 @@ def read_chunk(chunkId, raw=True, processed=True, stdwin=True):
     # 3. the windowed standard deviation arrays (possibly incl. masks)
     if stdwin:
         try:
-            file_list = glob.glob(basefilename + '_*_stdwin.dat')
+            file_list = glob.glob(basefilename + '_*stdwin.dat')
             if len(file_list) != 1:
                 logger.error("Cannot read chunk %d, (files matching the pattern: %s)" % 
                              (chunkId, file_list))
@@ -1359,17 +1365,17 @@ def delete_chunk(chunkId):
     """
     basefilename = os.path.join(config.chunkCacheDir, "chunk_%s" % chunkId)
     try:
-        for f in glob.glob(basefilename + '_*_raw.mseed'): # there should be just one
+        for f in glob.glob(basefilename + '_*raw.mseed'): # there should be just one
             os.remove(f)
     except:
         pass
     try:
-        for f in glob.glob(basefilename + '_*_proc.mseed'): # there should be just one
+        for f in glob.glob(basefilename + '_*proc.mseed'): # there should be just one
             os.remove(f)
     except:
         pass
     try:
-        for f in glob.glob(basefilename + '_*_stdwin.dat'): # there should be just one
+        for f in glob.glob(basefilename + '_*stdwin.dat'): # there should be just one
             os.remove(f)
     except:
         pass
@@ -1547,7 +1553,15 @@ def is_template_preloaded(templateId, templateTime, templateLength):
                 templateTime.strftime("%Y-%m-%dT%H-%M-%S"), templateLength)
     filename = os.path.join(dir_tp_mseed, filename)
 
-    return os.path.isfile(filename)
+    if not os.path.isfile(filename):
+        #
+        # Backward compatibility(to be removed someday)
+        #
+        filename = "template%02d_processed.mseed" % (templateId + 1)
+        filename = os.path.join(dir_tp_mseed, filename)
+        return os.path.isfile(filename)
+
+    return True
 
 def read_template(templateId):
     """
@@ -1561,7 +1575,7 @@ def read_template(templateId):
     try:
         filename = os.path.join(config.directory, 'templates_mseed',
                             'template%02d' % (templateId + 1))
-        file_list = glob.glob(filename + '_*_processed.mseed')
+        file_list = glob.glob(filename + '_*processed.mseed')
         if len(file_list) != 1:
             logger.error("Cannot read template %d, (files matching the pattern: %s)" % 
                          (templateId, file_list))
@@ -1586,7 +1600,7 @@ def delete_template(templateId):
     filename = os.path.join(config.directory, 'templates_mseed',
                             'template%02d' % (templateId + 1))
     try:
-        for f in glob.glob(filename + '_*_processed.mseed'): # there should be just one
+        for f in glob.glob(filename + '_*processed.mseed'): # there should be just one
             os.remove(f)
     except:
         pass
diff --git a/TM/setupclass.py b/TM/setupclass.py
index 8a8be623ae49e04e55d74dc5e212fbaae8df1e08..4f0b441b16584dbaa3ed2ed4bdb4bf70c3ea3ea4 100644
--- a/TM/setupclass.py
+++ b/TM/setupclass.py
@@ -212,7 +212,7 @@ class Setup:
 
         if not self.chunkCacheDir:
             # (self.directory is already absolute)
-            self.chunkCacheDir = os.path.join(self.directory, 'chunks' % self.chunk_len)
+            self.chunkCacheDir = os.path.join(self.directory, 'chunks')
         else:
             dirname = os.path.basename(self.directory).replace('results', self.region)
             self.chunkCacheDir = os.path.join(self.chunkCacheDir,