# Now verify the disk by running md5sum on the entire contents of the disk
 md5sum=$(tempfile)
-dd if=$dev bs=1M count=4440 2>>$logfile | md5sum | awk '{print$1}' > $md5sum
+dd if=$dev bs=1M count=$imagesizemb 2>>$logfile | md5sum | awk '{print$1}' > $md5sum
 
 # Check that the md5sums match
 if ! cmp $md5sum $img.md5sum; then
   echo "md5sum check FAILED" >> $logfile
+  echo "dd if=$dev bs=1M count=$imagesizemb 2>>$logfile | md5sum | awk '{print\$1}' > $md5sum" >> $logfile
+  e2label $dev >> $logfile
   cat $logfile | grep -v "MB written" | grep -v "to quit" | mailx -s "DVD md5sum doesn't match image file!!!" $mailto
   exit 1
 fi