fix implicit Globals

Added "var" prefix to variable "splitFileName" to avoid implicit globals.