diff --git a/workflow/scripts/annotate_peaks.R b/workflow/scripts/annotate_peaks.R
index 7680287cb7a090a337bf1181ef563341271d0611..4bc8d79296150f64c1a1eed2ecba0b5e33b597d1 100644
--- a/workflow/scripts/annotate_peaks.R
+++ b/workflow/scripts/annotate_peaks.R
@@ -51,10 +51,10 @@ column_names <- c("chr", "start", "end", "width", "strand_1", "name", "score", "
                   "ENSEMBL", "symbol", "geneName")
 
 for(index in c(1:length(peakAnnoList))) {
-  filename <- paste(names(peaks)[index], ".chipseeker_annotation.csv", sep="")
+  filename <- paste(names(peaks)[index], ".chipseeker_annotation.tsv", sep="")
   df <- as.data.frame(peakAnnoList[[index]])
   colnames(df) <- column_names
-  write.table(df[ , !(names(df) %in% c('strand_1'))], filename, sep="," ,quote=F, row.names=F)
+  write.table(df[ , !(names(df) %in% c('strand_1'))], filename, sep="\t" ,quote=F, row.names=F)
 
   # Draw individual plots
 
@@ -68,7 +68,7 @@ for(index in c(1:length(peakAnnoList))) {
   dev.off()
 
   # Upset Plot
-  pdf(upsetplot_name)
+  pdf(upsetplot_name, onefile=F)
   upsetplot(peakAnnoList[[index]])
   dev.off()
 }
diff --git a/workflow/tests/test_annotate_peaks.py b/workflow/tests/test_annotate_peaks.py
index e69813332281cc5a72983e35cbdc565cc2ded5d3..692ddced7762a9a9742c6bf51e652673b62bdd1f 100644
--- a/workflow/tests/test_annotate_peaks.py
+++ b/workflow/tests/test_annotate_peaks.py
@@ -14,7 +14,7 @@ test_output_path = os.path.dirname(os.path.abspath(__file__)) + \
 def test_annotate_peaks_singleend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_pie.pdf'))
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR238SGC.chipseeker_upsetplot.pdf'))
-    annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.csv'
+    annotation_file = test_output_path + 'ENCSR238SGC.chipseeker_annotation.tsv'
     assert os.path.exists(annotation_file)
     assert utils.count_lines(annotation_file) == 152840
 
@@ -23,6 +23,6 @@ def test_annotate_peaks_singleend():
 def test_annotate_peaks_pairedend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.chipseeker_pie.pdf'))
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.chipseeker_upsetplot.pdf'))
-    annotation_file = test_output_path + 'ENCSR729LGA.chipseeker_annotation.csv'
+    annotation_file = test_output_path + 'ENCSR729LGA.chipseeker_annotation.tsv'
     assert os.path.exists(annotation_file)
-    assert utils.count_lines(annotation_file) == 25614
+    assert utils.count_lines(annotation_file) == 25391
diff --git a/workflow/tests/test_overlap_peaks.py b/workflow/tests/test_overlap_peaks.py
index 36ed3da17e7eb61aa4440ae18527453d19a32df9..99d43b87939617c801bad0389f14e2683cde0f82 100644
--- a/workflow/tests/test_overlap_peaks.py
+++ b/workflow/tests/test_overlap_peaks.py
@@ -44,4 +44,4 @@ def test_overlap_peaks_singleend():
 def test_overlap_peaks_pairedend():
     assert os.path.exists(os.path.join(test_output_path, 'ENCSR729LGA.rejected.narrowPeak'))
     peak_file = test_output_path + 'ENCSR729LGA.replicated.narrowPeak'
-    assert utils.count_lines(peak_file) == 25878
+    assert utils.count_lines(peak_file) == 25655