diff --git a/codec.m b/codec.m
index df22f690a6ffe65dcf98580d1012b4fee5320931..e133dd78b13c37e6b94ba26056a79f3d21ca52bf 100644
--- a/codec.m
+++ b/codec.m
@@ -94,7 +94,7 @@ extraHEVCArgList = paramToArgList(extraHEVCParams);
 if ispc
     redirect = @(logfile) ['> "',logfile,'" | type "' logfile, '"'];
 elseif isunix
-    redirect = @(logfile) ['| tee ' ,LogFile];
+    redirect = @(logfile) ['| tee ' ,logfile];
 end
 
 % Execute command