Devloper, I don't see that udf on the site you pointed to.

Since the base64() function in your code above no longer has comments, I still need to ask where it came from.

Also, there shouldn't be any print on the console when you are writing to a file. Check @error to see what happened.
_________________________
!

download KiXnet