Come back to the original pwd on error to be able to print stacktrace properly
diff --git a/hudson-scripts/init/_1_trap.sh b/hudson-scripts/init/_1_trap.sh
index 20e3d1f..63a4e80 100644
--- a/hudson-scripts/init/_1_trap.sh
+++ b/hudson-scripts/init/_1_trap.sh
@@ -10,6 +10,8 @@
 #    Obeo - initial API and implementation
 # ====================================================================
 
+_ON_LOAD_PWD=$(pwd)
+
 __onExit() {
 	local RETURN=$?
 
@@ -17,6 +19,7 @@
 	env | sort > env.txt
 
 	if [ $RETURN -ne 0 -a $RETURN -lt 129 -o $RETURN -gt 165 ]; then
+		cd "${_ON_LOAD_PWD}"
 		LSCRITICAL "An error occurred"
 		LSLOGSTACK
 	fi