[fnrec] Add function recorder for debugging