Added some trace logging for parameters and results