Replaced FUNCNAME by variable containing the script name
Replaced FUNCNAME by variable containing the script name