typo: fName ==> fnName to fix sample code

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