diff --git a/spim_registration/timelapse/Snakefile b/spim_registration/timelapse/Snakefile
index 3edf065d5926533f4b629d084e1320b203c51ec6..cafc9128152cf949d6fe15794451ee7f16b399d8 100644
--- a/spim_registration/timelapse/Snakefile
+++ b/spim_registration/timelapse/Snakefile
@@ -17,7 +17,7 @@ for ds in datasets:
    bn = os.path.basename(ds)
    bn_res = fre.search(bn)
    xml_base,file_id = bn_res.group('xml_base'),bn_res.group('file_id')
-   xml_merge_in.append("{xbase}.job_{fid}.xml".format(xbase=xml_base, fid=file_id))
+   xml_merge_in.append("{xbase}.job_{fid}.xml".format(xbase=xml_base, fid=int(file_id)))
    
 #TODO: this should go into a python module in this path
 def produce_string(_fstring, *args, **kwargs):
@@ -33,9 +33,9 @@ rule done:
     input: [ ds+"_deconvolved" for ds in datasets ]
 
 rule registration:
-    input: "{xml_base}-{file_id,\d+}-00.h5"
-    output: "{xml_base}.job_{file_id,\d+}.xml"
-    log: "{xml_base}-{file_id,\d+}-registration.log"
+    input: "{xml_base}-{file_id}-00.h5"
+    output: "{xml_base}-{file_id,\d+}-00.h5_registered", #"{xml_base}.job_{file_id,\d+}.xml"
+    log: "{xml_base}-{file_id}-registration.log"
     run:
         cmd_string = produce_string(
            """{fiji-prefix} {fiji-app} \
@@ -79,7 +79,7 @@ rule registration:
         #shell("touch {output}")
 
 rule xml_merge:
-    input: xml_merge_in
+    input: [ item+"_registered" for item in datasets ] #xml_merge_in 
     output: "{xml_base}_merge.xml"
     log: "{xml_base}_merge.log"
     run:
@@ -159,4 +159,4 @@ rule deconvolution:
         shell(cmd_string)
   
 rule distclean:
-    shell : "rm -rf *registered *tif "+str(" ".join(xml_merge_in))
+    shell : "rm -rf *registered *tif *log *_deconvolved *.xml~* interestpoints "+str(" ".join(xml_merge_in))
diff --git a/spim_registration/timelapse/registration.bsh b/spim_registration/timelapse/registration.bsh
index 4765129a0a9a541300371f17aabd80e4f5ccff6f..f7c6b26bb1edb96765c2da801b2c3f42da75e7e6 100644
--- a/spim_registration/timelapse/registration.bsh
+++ b/spim_registration/timelapse/registration.bsh
@@ -23,7 +23,7 @@ System.out.println( "selected_xml = " + xml_path + xml_filename + ".xml");
 System.out.println( "-------------------------------------------------------" );
 System.out.println( "General parameters: " );
 
-parallel_timepoints = System.getProperty( "parallel_timepoints" );
+parallel_timepoints = Integer.parseInt(System.getProperty( "parallel_timepoints" ));
 process_timepoint = System.getProperty( "process_timepoint" );
 process_channel = System.getProperty( "process_channel" );
 process_illumination = System.getProperty( "process_illumination" );
@@ -101,13 +101,23 @@ System.out.println( "detection_min_max = " + detection_min_max );
 
 //activate cluster processing
 System.out.println( "=======================================================" );
+try {
 IJ.run("Toggle Cluster Processing", "display_cluster");
+}
+catch ( e ) { 
+
+    print( "[registration::activate_cluster_processing] caught exception: "+e );
+    //important to fail the process if exception occurs
+    runtime.exit(1);
+    
+}
 System.out.println( "Activated Cluster Processing" );
 
 
 //interest point detection
 System.out.println( "=======================================================" );
 System.out.println( "Starting Detection of Interest Points" );
+try {
 IJ.run("Detect Interest Points for Registration", 
 	"select_xml=" + xml_path + xml_filename + ".xml " +  
 	"unique_id=" + parallel_timepoints + " " +
@@ -127,7 +137,14 @@ IJ.run("Detect Interest Points for Registration",
 	"radius_2=" + radius_2 + " " + 
 	"threshold=" + threshold + " " +
 	"find_maxima");
+}
+catch ( e ) { 
 
+    print( "[registration::interest_points] caught exception: "+e );
+    //important to fail the process if exception occurs
+    runtime.exit(1);
+    
+}
 //registration based on interest point detection
 System.out.println( "=======================================================" );
 System.out.println( "Starting Registration" );
@@ -156,7 +173,7 @@ try {
 }
 catch ( e ) { 
 
-    print( "[registration] caught exception: "+e );
+    print( "[registration::based_on_interestpoints] caught exception: "+e );
     //important to fail the process if exception occurs
     runtime.exit(1);