diff --git a/common.wdl b/common.wdl
index 2d099aaa9d921e453b3b2b500acb9d953bcb40e2..d5db7685565de1d563ddf2b74ef57396a919035f 100644
--- a/common.wdl
+++ b/common.wdl
@@ -32,9 +32,10 @@ task CheckFileMD5 {
     }
 
     command {
+        bash -c '
         set -e -o pipefail
-        MD5SUM=$(md5sum ~{file} | cut -d ' ' -f 1)
-        [ "$MD5SUM" = '~{md5}' ]
+        echo "~{md5}  ~{file}" | md5sum -c
+        '
     }
 
     runtime {