Test function not working

Did you try adding a breakpoint or some logging to check whether the problem is the trace or the function you are calling?