diff --git a/+af_tools/xf2mat.m b/+af_tools/xf2mat.m
index b0080d4480ac032a78100d95163cf75c53a4452b..7ec4c2ef6dcde1d86c53245f4de31d895bab1246 100644
--- a/+af_tools/xf2mat.m
+++ b/+af_tools/xf2mat.m
@@ -262,6 +262,7 @@ end
 
 % --------------------------------------------------------------------------------------------------
 function filename = genfilename(Polar)
+
     % GENFILENAME Generates a proper filename for the saved file
 
     import af_tools.utils.appendextension
@@ -269,7 +270,7 @@ function filename = genfilename(Polar)
     order = floor(log10(Polar.reynolds));
     reBase = round(Polar.reynolds ./ 10.^order);
 
-    if nbFiles == 1
+    if length(Polar.reynolds) == 1
         reStr = sprintf('-Re_%de%d', reBase, order);
     else
         reStr = sprintf('-Re_%de%d-%de%d', reBase(1), order(1), reBase(end), order(end));
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eaaf910ecac260e5f9c4a30d0a80162faf3a5f23..1f8403c9faebc47d3acd4e2f5d75625490077a9c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,8 +9,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Added
 
-- Unit tests for **utils.selig** and **utils.lednicer**
-
 ### Changed
 
 ### Deprecated
@@ -19,6 +17,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ### Fixed
 
+## [2.0.1] - 2022-05-24
+
+### Added
+
+- Unit tests for **utils.selig** and **utils.lednicer**
+- **xf2mat**: test for autosave
+
+### Fixed
+
+- **xf2mat**: bug with autosave
+
 ## [2.0.0] - 2022-04-24
 
 ### Added
@@ -75,7 +84,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 - Initial release
 
-[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.0...master
+[Unreleased]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.1...master
+[2.0.1]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v2.0.0...v2.0.1
 [2.0.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.2.0...v2.0.0
 [1.2.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.1.0...v1.2.0
 [1.1.0]: https://gitlab.uliege.be/am-dept/matlab_airfoil_toolbox/-/compare/v1.0.0...v1.1.0
diff --git a/tests/test_xf2mat.m b/tests/test_xf2mat.m
index 813e10f06c9d9e57367555fc7c9b4d3b9e01f5f8..a9e0b37d2cc001e8ff745a412c9597f8bb8400c4 100644
--- a/tests/test_xf2mat.m
+++ b/tests/test_xf2mat.m
@@ -212,3 +212,18 @@ function test_correctOutputValues(testCase)
     verifyEqual(testCase, Polar.airfoil, {'NACA_2412'});
 
 end
+
+function test_autosave(testCase)
+    % Verify if file is properly saved
+
+    testdir = [pwd, '/test_utils'];
+
+    Polar = af_tools.xf2mat(testdir, 'xfoil-naca2412_re1e6', 'autosave', true);
+    savedPolar = load('NACA_2412-Re_1e6.mat');
+    savedPolar = savedPolar.Polar;
+
+    verifyEqual(testCase, Polar, savedPolar);
+
+    % Cleanup
+    delete NACA_2412-Re_1e6.mat;
+end