diff --git a/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir b/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir
index 0eb6c7308..a1ae680b6 100755
--- a/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir
+++ b/diskimage_builder/elements/pkg-map/extra-data.d/10-create-pkg-map-dir
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
+if [ ${DIB_DEBUG_TRACE:-1} -gt 1 ]; then
     set -x
 fi
 set -eu
@@ -16,6 +16,7 @@ for i in "${!image_elements[@]}"; do
 
     pkg_map="${element_dir}/pkg-map"
     if [ -f "${pkg_map}" ]; then
+        echo "Copying pkg-map for ${element}"
         sudo cp "${pkg_map}" "$TMP_MOUNT_PATH/usr/share/pkg-map/$element"
     fi
 done
diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions
index 9bca5c3ce..1caf891e3 100644
--- a/diskimage_builder/lib/common-functions
+++ b/diskimage_builder/lib/common-functions
@@ -92,6 +92,10 @@ function copy_hooks_not_overwrite () {
 }
 
 function generate_hooks () {
+    local xtrace
+    xtrace=$(set +o | grep xtrace)
+    set +o xtrace
+
     local dir
     local file
 
@@ -103,6 +107,8 @@ function generate_hooks () {
         local element=$i
         local element_dir=${image_elements[$i]}
 
+        echo "Copying hooks for ${element}"
+
         for dir in $(find $element_dir \
                           -follow -mindepth 1 -maxdepth 1 \
                           -type d -not -name tests); do
@@ -113,6 +119,8 @@ function generate_hooks () {
             cp -t $TMP_HOOKS_PATH -a $file
         done
     done
+
+    $xtrace
 }
 
 # Call the supplied break-in routine if the named point is listed in the break