Not every sub, just in the subs/functions that are called by the ASP page do it right before you exit the function