 -    fi
 -fi
 -
- # All done, lets call cleanup
- cleanup
+-# All done, lets call cleanup
+-cleanup

 # exits. Which also happens when we background the mainroutine, ie. while we still
 # run!)
-trap cleanup ERR TERM HUP INT QUIT
+trap cleanup TERM QUIT
 
 # Start log by redirecting stdout and stderr there and closing stdin
 mkdir -p "$LOGDIR"

 
 # run a hook
diff --git a/bin/ftpsync b/bin/ftpsync
index e3960fa..7c2af1a 100755
--- a/bin/ftpsync
+++ b/bin/ftpsync
@@ -1,6 +1,8 @@
