typo: fName ==> fnName to fix sample

Code works fine if the variable names are corrected to be consistent `fnName` instead of `fName` && `fnName`.