diff --git a/icinga-cli.sh b/icinga-cli.sh
index 4f55839b2d1f6c6bb56d7b34ea131321e9f2f632..4d4a782711b4ff58610e2f7b28b3ac00f9461f98 100755
--- a/icinga-cli.sh
+++ b/icinga-cli.sh
@@ -14,7 +14,7 @@
 
 
 _product="ICINGA PASSIVE CLIENT"
-_version="0.3"
+_version="0.4"
 _license="GNU GPL 3.0"
 _copyright='(c) 2020 Institute for Medical Education * University of Bern'
 
@@ -178,6 +178,11 @@ function processAllChecks(){
 function _parseCheckConfig(){
   local _myconfig=$1
 
+  if [ ! -r $_myconfig ]; then
+    echo "ERROR: config file is not readable [$_myconfig]"
+    exit 1
+  fi
+
   # EXAMPLE a config contains ...
   # checkname=check_cronstatus
   # command=check_cronstatus -param1 -param2
@@ -308,6 +313,11 @@ function processCheck(){
       # $myFullscript $myparams | tee $_outfile
       eval $myFullscript $myparams > $_outfile
       rc=$?
+      if [ $rc -ne 0 ]; then
+	echo "ERROR: unable to write file $_outfile. Maybe the setup is inclomplete or someone created a file as root."
+	ls -ld ${dir_data} $_outfile
+	exit 1
+      fi
       typeset -i local iTsEnd=`date +%s`
       outPerfdata=`grep '|' $_outfile | cut -f 2 -d '|'`
       echo