diff --git a/macOS/build.sh b/macOS/build.sh
index 10fcf8964eadf72ed9f3ecc9e5c7d60b93ef9f5f..28357a90a92cdc6ab970f2d595cb13e54be6df5b 100755
--- a/macOS/build.sh
+++ b/macOS/build.sh
@@ -18,6 +18,7 @@
 # along with Dynare.  If not, see <https://www.gnu.org/licenses/>.
 
 set -ex
+#exec > >(tee build-logfile.log) 2>&1 # uncomment for debugging
 
 ROOTDIR=$(pwd)/..
 ##
@@ -37,9 +38,9 @@ else
     path_remove PATH /opt/homebrew/bin
     MATLAB_ARCH=maci64
     # On x86_64 we need to differentiate between older and newer MATLAB versions
-    MATLAB_PATH_OLD=/Applications/MATLAB_R2016b.app
+    OLD_MATLAB_PATH=/Applications/MATLAB_R2016b.app
 fi
-MATLAB_PATH_NEW=/Applications/"$PKG_ARCH"/MATLAB_R2023b.app
+MATLAB_PATH=/Applications/"$PKG_ARCH"/MATLAB_R2023b.app
 
 # Append texbin to PATH to access latexmk and friends
 path_prepend PATH /Library/TeX/texbin
@@ -71,12 +72,12 @@ common_meson_opts=(-Dbuild_for=matlab -Dbuildtype=release -Dprefer_static=true -
                    --native-file scripts/homebrew-native-$PKG_ARCH.ini)
 
 # Build for MATLAB ⩾ R2018a (x86_64) and MATLAB ⩾ R2023b (arm64)
-arch -$PKG_ARCH meson setup "${common_meson_opts[@]}" -Dmatlab_path="$MATLAB_PATH_NEW" build-matlab --wipe
+arch -"$PKG_ARCH" meson setup "${common_meson_opts[@]}" -Dmatlab_path="$MATLAB_PATH" build-matlab --wipe
 arch -$PKG_ARCH meson compile -v -C build-matlab
 
 if [[ $PKG_ARCH == x86_64 ]]; then
     # Build for MATLAB < R2018a
-    arch -$PKG_ARCH meson setup "${common_meson_opts[@]}" -Dmatlab_path="$MATLAB_PATH_OLD" build-old-matlab --wipe
+    arch -"$PKG_ARCH" meson setup "${common_meson_opts[@]}" -Dmatlab_path="$OLD_MATLAB_PATH" build-old-matlab --wipe
     arch -$PKG_ARCH meson compile -v -C build-old-matlab
 fi
 
diff --git a/macOS/conclusion_template.html b/macOS/conclusion_template.html
index 5f88c45bef53ec0d4f656a889a3dc80ca109b55d..4952a906360b3a74410272fbfd806ba248d6a36a 100644
--- a/macOS/conclusion_template.html
+++ b/macOS/conclusion_template.html
@@ -2,7 +2,7 @@
   <head>
     <meta charset="UTF-8">
     <meta name="viewport" content="width=device-width, initial-scale=1">
-    <title>Postinstallation Recommendations</title>
+    <title>Recommendations</title>
     <style>
       .center-text {
         text-align: center;
@@ -22,7 +22,7 @@
   
   <body>
     <header class="center-text">
-      <h1>Postinstallation Recommendations</h1>      
+      <h1>Recommendations</h1>
     </header>
 
     <main>
diff --git a/macOS/distribution_template.xml b/macOS/distribution_template.xml
index e4eb022c73be5f92584d52092a9e9ae4efbf6a9a..ac084d82845d687b946efc8fd48228ff18d84ba8 100644
--- a/macOS/distribution_template.xml
+++ b/macOS/distribution_template.xml
@@ -12,7 +12,7 @@
   <choices-outline>
     <line choice="default" />
   </choices-outline>
-  <choice id="default" title="Dynare" description="Dynare Required Files" start_enabled="false" enabled="false" customLocation="/Applications/Dynare/dynare-LOCATION">
+  <choice id="default" title="Dynare" description="Dynare Required Files" start_enabled="false" enabled="false" customLocation="/Applications/Dynare/LOCATION">
     <pkg-ref id="org.dynare.VERSION_NO_SPACE" />
   </choice>  
   <pkg-ref id="org.dynare.VERSION_NO_SPACE" version="VERSION_NO_SPACE">dynare-VERSION_NO_SPACE.pkg</pkg-ref>
diff --git a/scripts/homebrew-native-arm64.ini b/scripts/homebrew-native-arm64.ini
index 342143b16335eacda9a2e2d7120d87a327025181..39bdea15045d2b6a5c70bc32521c386e1ee6510a 100644
--- a/scripts/homebrew-native-arm64.ini
+++ b/scripts/homebrew-native-arm64.ini
@@ -1,4 +1,4 @@
-# Meson native file for compiling under Homebrew arm64
+# Meson native file for compiling under Homebrew for arm64 architecture
 
 [binaries]
 cpp = '/opt/homebrew/bin/g++-13'
diff --git a/scripts/homebrew-native-x86_64.ini b/scripts/homebrew-native-x86_64.ini
index 158b278876f9e58acd72c68729570308c9dedcb0..42a189fe2035fbb2ddb56818d17554a627831211 100644
--- a/scripts/homebrew-native-x86_64.ini
+++ b/scripts/homebrew-native-x86_64.ini
@@ -1,4 +1,4 @@
-# Meson native file for compiling under Homebrew / x86_64
+# Meson native file for compiling under Homebrew for x86_64 architecture
 
 [binaries]
 cpp = '/usr/local/bin/g++-13'