more checks to make sure script is run as intended
diff --git a/tools/warm_apts_and_pips.sh b/tools/warm_apts_and_pips.sh
index c0b02b9..b20519f 100755
--- a/tools/warm_apts_and_pips.sh
+++ b/tools/warm_apts_and_pips.sh
@@ -1,5 +1,11 @@
 #!/usr/bin/env bash
 
+# echo commands
+set -o xtrace
+
+# exit on error to stop unexpected errors
+set -o errexit
+
 # Keep track of the current directory
 TOOLS_DIR=$(cd $(dirname "$0") && pwd)
 TOP_DIR=`cd $TOOLS_DIR/..; pwd`
@@ -20,6 +26,12 @@
     exit 1
 fi
 
+# Make sure we are in the correct dir
+if [ ! -d files/apts ]; then
+    echo "Please run this script from devstack/tools/"
+    exit 1
+fi 
+
 # Mount the image
 STAGING_DIR=`mktemp -d uec.XXXXXXXXXX`
 mkdir -p $STAGING_DIR