diff --git a/integrationtests/test.sh b/integrationtests/test.sh
index a56b758421a059a0cc3461c08600c13ffd93705c..80a2afe307ab1da628faa39d4ba8ef93bc6959e4 100755
--- a/integrationtests/test.sh
+++ b/integrationtests/test.sh
@@ -3,6 +3,7 @@ OUT=/tmp/crawler.output
 ls 
 cat pycaosdb.ini
 rm -rf cache.db
+set -e
 echo "Clearing database"
 python3 clear_database.py
 echo "Testing crawler without cfoods"
@@ -29,7 +30,6 @@ echo "run crawler"
 # rename the moved file
 mv extroot/DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx_back extroot/DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx
 # check whether there was something UNAUTHORIZED
-set -e
 grep "There where unauthorized changes" $OUT
 # get the id of the run which is the last field of the output string
 RUN_ID=$(grep "run id:" $OUT | awk '{ print $NF }')