Create bfn_thresh.lua